Jeremy Soller
de68aced95
Add current_exe support
2016-11-14 19:08:48 -07:00
Jeremy Soller
18bf0540bf
Fix redox prefix handling
2016-11-14 15:02:18 -07:00
Corey Farwell
af1aa1bccf
Update top-level path doc examples to show results.
2016-11-14 15:54:40 -05:00
Jeremy Soller
a0b5dfef2a
Add fcntl
2016-11-14 12:15:11 -07:00
Corey Farwell
f53d062d42
Minor rewriting of std::path::Path::push doc example.
2016-11-13 12:58:55 -05:00
Eduard-Mihai Burtescu
75f2c21124
Rollup merge of #37699 - alexcrichton:default-for-duration, r=brson
...
std: Derive `Default` for `Duration`.
Discussed in #37546 the libs team reached the conclusion that a default zero
duration seems like a reasonable implementation of the `Default` trait.
Closes #37546
2016-11-12 10:38:43 +02:00
Eduard-Mihai Burtescu
8886eccdf7
Rollup merge of #37696 - arthurprs:patch-1, r=alexcrichton
...
Remove one bounds check from BufReader
Very minor thing. Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
CC #37573
2016-11-12 10:38:42 +02:00
Eduard-Mihai Burtescu
29195e26d2
Rollup merge of #37527 - Mark-Simulacrum:mpsc-recvtimeouterror-error-impl, r=alexcrichton
...
Add Error implementation for std::sync::mpsc::RecvTimeoutError.
Fixes https://github.com/rust-lang/rust/issues/37525 .
2016-11-12 10:38:37 +02:00
Jeremy Soller
0bb9a95907
Merge branch 'master' into redox
2016-11-10 20:37:34 -07:00
Jeremy Soller
25e1a4a008
Use target_os = redox for cfg
2016-11-10 20:13:14 -07:00
Jeremy Soller
79a8c272fb
Fix readdir
2016-11-10 19:58:19 -07:00
Jeremy Soller
a90850995f
Fixes for stdio and processes on Redox
2016-11-10 19:33:59 -07:00
Alex Crichton
30502b8205
std: Derive Default for Duration.
...
Discussed in #37546 the libs team reached the conclusion that a default zero
duration seems like a reasonable implementation of the `Default` trait.
Closes #37546
2016-11-10 16:21:51 -08:00
Arthur Silva
dcd80b80ae
Remove one bounds check from BufReader
...
Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
2016-11-10 22:26:50 +01:00
Jeremy Soller
ced32a08f3
Fix exec
2016-11-09 20:52:30 -07:00
Tshepang Lekhonkhobe
a9349d723d
doc: fix typos
2016-11-10 05:23:41 +02:00
Eduard-Mihai Burtescu
aad4f29f7b
Rollup merge of #37622 - ollie27:cstring, r=alexcrichton
...
Slightly optimise CString
Avoid a reallocation in CString::from and CStr::to_owned.
2016-11-09 20:51:18 +02:00
Eduard-Mihai Burtescu
d712882228
Rollup merge of #37432 - achanda:send_to, r=alexcrichton
...
Clarify that send_to might panic in certain cases
Closes #34202
r? @alexcrichton
2016-11-09 20:51:16 +02:00
Abhishek Chanda
50bfc23816
Clarify that send_to might return an error in certain cases
...
Closes #34202
2016-11-09 09:03:33 +00:00
Steve Klabnik
e6b6586667
Rollup merge of #37588 - GuillaumeGomez:missing_io_urls, r=frewsxcv
...
Add missing urls on io structs
r? @steveklabnik
2016-11-08 16:20:57 -05:00
Oliver Middleton
18f5f9960f
Slightly optimise CString
...
Avoid a reallocation in CString::from and CStr::to_owned.
2016-11-08 16:55:24 +00:00
bors
38a959a543
Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakis
...
Stabilize `..` in tuple (struct) patterns
I'd like to nominate `..` in tuple and tuple struct patterns for stabilization.
This feature is a relatively small extension to existing stable functionality and doesn't have known blockers.
The feature first appeared in Rust 1.10 6 months ago.
An example of use: https://github.com/rust-lang/rust/pull/36203
Closes https://github.com/rust-lang/rust/issues/33627
r? @nikomatsakis
2016-11-08 02:06:45 -08:00
Alex Crichton
8e5c91a6fb
Rollup merge of #37589 - raphlinus:fuchsia_random, r=alexcrichton
...
std: Track change to cprng syscall signature (Fuchsia)
The mx_cprng_draw syscall has changed signature to separate the status
and size return values, rather than multiplexing them into a single
value with errors interpreted as a negative value. This patch tracks
that change.
2016-11-05 10:50:25 -07:00
Alex Crichton
727f1d3f16
Rollup merge of #37585 - leodasvacas:change_into_to_from, r=alexcrichton
...
Change `Into<Vec<u8>> for String` and `Into<OsString> for PathBuf` to From
Fixes #37561 . First contribution, happy with any and all feedback!
2016-11-05 10:50:25 -07:00
Alex Crichton
112a4ff748
Rollup merge of #37537 - GuillaumeGomez:error_kind_doc, r=steveklabnik
...
Add missing urls for ErrorKind's variants
r? @steveklabnik
2016-11-05 10:50:23 -07:00
Alex Crichton
1d41d5bd01
Rollup merge of #37470 - arthurprs:sip-smaller, r=alexcrichton
...
Don't reuse RandomState seeds
cc #36481
2016-11-05 10:50:22 -07:00
Guillaume Gomez
36e6f4be31
add missing urls on io structs
2016-11-05 00:48:03 +01:00
Raph Levien
fe953dc16e
std: Track change to cprng syscall signature (Fuchsia)
...
The mx_cprng_draw syscall has changed signature to separate the status
and size return values, rather than multiplexing them into a single
value with errors interpreted as a negative value. This patch tracks
that change.
2016-11-04 13:04:27 -07:00
leonardo.yvens
3e4bd88438
Change Into<Vec<u8>> for String and Into<OsString> for PathBuf to From impls
2016-11-04 15:54:08 -02:00
bors
d2bc30b03f
Auto merge of #37037 - Mark-Simulacrum:stack-error, r=alexcrichton
...
Add conversions from `io:ErrorKind` to `io::Error`
Filing to help with discussion around the possibility of doing this.
Current changes are clearly backwards incompatible, but I think adding a new function (with a bikeshed on naming) like `Error::new_str` should be possible (or some other way of specializing the string error message case) to fix #36658 .
2016-11-04 03:38:18 -07:00
Jeremy Soller
01e8378070
Update to new sys requirements
2016-11-03 08:58:01 -06:00
Jeremy Soller
74dc845c2d
Merge branch 'master' into redox
2016-11-03 08:52:48 -06:00
Vadim Petrochenkov
74bb594563
Stabilize .. in tuple (struct) patterns
2016-11-03 01:38:15 +03:00
Jonathan Turner
b333860611
Rollup merge of #37498 - sanxiyn:unused-type-alias, r=eddyb
...
Remove unused type aliases
Found by extending the dead code lint. The lint itself is work in progress because of false positives.
cc #37455 .
2016-11-02 15:09:42 -04:00
Guillaume Gomez
942f909c1f
Add missing urls for ErrorKind's variants
2016-11-02 19:08:10 +01:00
bors
0ca9967af7
Auto merge of #36948 - brson:sys, r=brson
...
More refactoring to obey platform abstraction lint
The most interesting things here are moving `std/sys/common` to `std/sys_common`, and `std/num/{f32,f64}.rs` to `std/{f32,f64}.rs`, and adding more documentation to `std/lib.rs`.
r? @alexcrichton
2016-11-02 08:44:33 -07:00
Mark-Simulacrum
99234bbe9e
Add a new non-heap allocated variant to io::Error's representation.
...
Implement From<ErrorKind> for io::Error, intended for use with errors
that should never be exposed to the user.
2016-11-02 09:01:14 -06:00
Mark-Simulacrum
2af61112d4
Add Error implementation for std::sync::mpsc::RecvTimeoutError.
2016-11-02 08:59:55 -06:00
Brian Anderson
6135cbc9e2
std: Flatten the num directory to reflect the module layout
...
This makes it dissimilar to how core is structured on disk, but
more predictable on its own.
2016-11-01 17:08:24 +00:00
Brian Anderson
c251884575
Clean up and add more comments to libstd/lib.rs
2016-11-01 17:08:24 +00:00
Brian Anderson
8f5bb1f7c0
std: Remove unused test feature
2016-11-01 17:08:24 +00:00
Brian Anderson
ee71dc5476
Document sys_common and sys
2016-11-01 17:08:24 +00:00
Brian Anderson
ca30691813
std: Move sys_common to libstd/sys_common
...
Make the directory structure reflect the module structure. I've always
found the existing structure confusing.
2016-11-01 17:08:24 +00:00
Brian Anderson
f3a709dc52
std: Move platform-specific out of sys_common::util
2016-11-01 17:08:24 +00:00
Brian Anderson
219c018894
std: Move platform-specific code out of libstd/lib.rs
2016-11-01 17:08:24 +00:00
Brian Anderson
6d54cd4b2c
std: Move a plattform-specific constant to sys::stdio
2016-11-01 17:08:24 +00:00
Brian Anderson
8b2600dbf9
Document reasoning for supporting both fast and OS TLS in the same bin
2016-11-01 17:08:24 +00:00
Brian Anderson
568840707c
std: Move elf TLS to sys::fast_thread_local
2016-11-01 17:08:24 +00:00
Guillaume Gomez
7e805eae8e
Rollup merge of #37316 - ollie27:docs_links, r=GuillaumeGomez
...
Fix a few links in the docs
r? @steveklabnik
2016-11-01 16:15:52 +01:00
bors
73f5cad6c4
Auto merge of #37178 - apasel422:issue-37136, r=alexcrichton
...
Implement `RefUnwindSafe` for atomic types
Closes #37136
2016-11-01 00:44:50 -07:00