summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-08-18Correct has_root() on RedoxIan Douglas Scott-3/+20
2017-08-18redox: Require scheme for path to be absoluteIan Douglas Scott-2/+10
Redox paths are problematic. It would make sense to add a `Scheme` variant to the `std::path::Component` enum; but that would presumably be a breaking change due to exhaustive matching. Alternately it could use the existing `Prefix` variant, like Windows, but none of the existing types of prefix make sense, Redox only has one kind, and adding a new variant to that enum has the same issue as `Component`.
2017-08-18Auto merge of #43900 - TobiasSchaffner:net_out_of_io, r=alexcrichtonbors-59/+62
Refactoring: move net specific file descriptor methods Move the implementations of net specific file descriptor methods from io to net. This makes it easier to exclude net at all if it is not needed for a target.
2017-08-17Rollup merge of #43915 - adrian5:patch-1, r=sfacklerCorey Farwell-1/+1
Fix typo in doc
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-7/+7
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-17Minor rewrite of char primitive unicode intro.Corey Farwell-13/+18
Opened primarily to address #36998.
2017-08-17Fix typo in docadrian5-1/+1
2017-08-16Refactoring: move net specific fd imps to netTobias Schaffner-59/+62
Move the implementations of net specific file descriptior implementations to net. This makes it easier to exclude net at all if not needed for a target.
2017-08-16Auto merge of #43883 - frewsxcv:frewsxcv-set-readonly-clarification, ↵bors-3/+13
r=QuietMisdreavus Clarify writable behavior of readonly-named `Permissions` methods. Opened primarily to fix https://github.com/rust-lang/rust/issues/41984.
2017-08-16Auto merge of #43710 - zackmdavis:field_init_shorthand_power_slam, ↵bors-60/+60
r=Mark-Simulacrum use field init shorthand EVERYWHERE Like #43008 (f668999), but [(lacking reasons to be more timid)](https://github.com/rust-lang/rust/pull/43008#issuecomment-312463564) _much more aggressive_. r? @Mark-Simulacrum
2017-08-15Clarify 'writable'-changing behavior of `set_readonly`.Corey Farwell-1/+5
Fixes https://github.com/rust-lang/rust/issues/41984.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-60/+60
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-7/+7
2017-08-15Auto merge of #43635 - ids1024:backtrace-redox, r=alexcrichtonbors-33/+160
Make backtraces work on Redox, copying Unix implementation The `backtrace/` directory here is the same as the Unix one, except for adding an implementation of `get_executable_filename`.
2017-08-15Clarify `readonly` method is also about being 'unwritable'.Corey Farwell-1/+1
2017-08-15Add comments clarifying behavior of unix `set_readonly` behavior.Corey Farwell-1/+7
2017-08-14Rollup merge of #43848 - frewsxcv:frewsxcv-stack-size, r=QuietMisdreavusCorey Farwell-10/+45
Rewrite/reorganize docs for stack size/thread names for spawned threads. * Moves docs about stack size and thread naming from `Builder` to the `std::thread` module * Adds more links to the new module-level documentation * Mentions the 2 MiB stack size default, but indicate it's subject to change Fixes https://github.com/rust-lang/rust/issues/43805.
2017-08-14Rollup merge of #43756 - sfackler:instant-nondecreasing, r=alexcrichtonCorey Farwell-2/+2
Instant is monotonically nondecreasing We don't want to guarantee that `Instant::now() != Instant::now()` is always true since that depends on the speed of the processor and the resolution of the clock.
2017-08-14Indicate which stack size option has precedence.Corey Farwell-1/+1
2017-08-13std: Respect formatting flags for str-like OsStrAlex Crichton-3/+13
Historically many `Display` and `Debug` implementations for `OsStr`-like abstractions have gone through `String::from_utf8_lossy`, but this was updated in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the unfortunate side effect of causing a regression (#43765) in code which relied on these `fmt` trait implementations respecting the various formatting flags specified. This commit opportunistically adds back interpretation of formatting trait flags in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can delegate to the formatting implementation for `str`. This doesn't entirely solve the regression as non-utf8 paths will format differently than they did before still (in that they will not respect formatting flags), but this should solve the regression for all "real world" use cases of paths and such. The door's also still open for handling these flags in the future! Closes #43765
2017-08-13Indicate thread names get passed to the OS.Corey Farwell-4/+8
2017-08-13Rewrite docs for stack size/thread names for spawned threads.Corey Farwell-10/+41
* Moves docs about stack size and thread naming from `Builder` to the `std::thread` module * Adds more links to the new module-level documentation * Mentions the 2 MiB stack size default, but indicate it's subject to change Fixes https://github.com/rust-lang/rust/issues/43805.
2017-08-13Docs: restore link text after renaming anchorRuud van Asseldonk-2/+2
The text does not need the hyphen, but the anchor name does.
2017-08-13Replace space in Markdown link labelRuud van Asseldonk-3/+3
With the space, the tidy check does not recognize it as a link label. See also the comment above in line_is_url() in src/tools/tidy/src/style.rs.
2017-08-13Point "deref coercions" links to new bookRuud van Asseldonk-1/+1
Currently the link on doc.rust-lang.org is semi-broken; it links to a page that links to the exact page in the first edition in the book, or to the index of the second edition of the book. If the second editions is the recommended one now, we should point the links at that one. It seems that in the mean time, the links have been updated to point directly to the first edition of the book, but that hasn't made it onto the stable channel yet. By the time this commit makes it onto the stable channel, the second edition of the book should be complete enough. At least the part about deref coercions is.
2017-08-13Rollup merge of #43833 - dtolnay:connect-timeout, r=sfacklerGuillaume Gomez-1/+1
Fix TcpStream::connect_timeout tracking issue number Before: https://github.com/rust-lang/rust/pull/43709 After: https://github.com/rust-lang/rust/issues/43079 r? @sfackler
2017-08-13Rollup merge of #43821 - NilSet:redox-dns, r=alexcrichtonGuillaume Gomez-14/+12
Handle DNS label compression in more places in Redox name resolution
2017-08-13Rollup merge of #43819 - frewsxcv:frewsxcv-include, r=QuietMisdreavusGuillaume Gomez-8/+47
Improve doc examples for `include*` macros.
2017-08-13Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkovGuillaume Gomez-24/+25
Fix some typos Follow up of #43794 If refined my script a little bit and found some more.
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-32/+96
Expose all OS-specific modules in libstd doc. 1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc. 2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness. 3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed. Fixes #24658 (Does _not_ fully implement #1998).
2017-08-12Fix TcpStream::connect_timeout tracking issue numberDavid Tolnay-1/+1
2017-08-12Fix some typosBastien Orivel-24/+25
2017-08-12Auto merge of #43746 - eddyb:sound-thread-local, r=alexcrichtonbors-31/+32
Check #[thread_local] statics correctly in the compiler. Fixes #43733 by introducing `#[allow_internal_unsafe]` analogous to `#[allow_internal_unstable]`, for letting a macro expand to `unsafe` blocks and functions even in `#![forbid(unsafe_code)]` crates. Fixes #17954 by not letting references to `#[thread_local]` statics escape the function they're taken in - we can't just use a magical lifetime because Rust has *lifetime parametrism*, so if we added the often-proposed `'thread` lifetime, we'd have no way to check it in generic code. To avoid potential edge cases in the compiler, the lifetime is actually that of a temporary at the same position, i.e. `&TLS_STATIC` has the same lifetime `&non_const_fn()` would. Referring to `#[thread_local]` `static`s at compile-time is banned now (as per PR discussion). Additionally, to remove `unsafe impl Sync` from `std::thread::local::fast::Key`, `#[thread_local]` statics are now not required to implement `Sync`, as they are not shared between threads.
2017-08-12Check #[thread_local] statics correctly in the compiler.Eduard-Mihai Burtescu-31/+32
2017-08-12Auto merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,imperiobors-4/+4
Fix some typos I wrote a really naive script and found those typos in the documentation.
2017-08-11Handle DNS label compression in more placesThomas Levy-14/+12
2017-08-12Add complete doc example for `include_str!`.Corey Farwell-1/+18
2017-08-12Add complete doc example for `include_bytes!`.Corey Farwell-1/+18
2017-08-12Demonstrate `include!` with Rust code, not just a string slice literal.Corey Farwell-6/+11
2017-08-12Fix error during cross-platform documentation.kennytm-2/+21
2017-08-11Rollup merge of #43791 - GuillaumeGomez:file-docs, r=QuietMisdreavusGuillaume Gomez-19/+30
File docs r? @rust-lang/docs
2017-08-11Rollup merge of #43783 - prisme60:prisme60-typo, r=Mark-SimulacrumGuillaume Gomez-1/+1
Fix typo corersponding -> corresponding I was reading the documentation of __Struct std::os::unix::net::UnixListener__ when I saw a typo inside.
2017-08-11Rollup merge of #43715 - ollie27:docs_long_link, r=QuietMisdreavusGuillaume Gomez-1/+1
Stop using URL shortener in docs tidy will no longer complain about long lines containing links so there is no reason to use a URL shortener here.
2017-08-10Auto merge of #43589 - aidanhs:aphs-fix-system-malloc, r=alexcrichtonbors-0/+16
Make a disable-jemalloc build work Fixes #43510. I've tested this up to building a stage1 compiler. r? @alexcrichton cc @cuviper @vorner @cuviper your fix was almost correct, you just had a stray `!` in there which caused the second error you saw.
2017-08-11Fix some typosBastien Orivel-4/+4
2017-08-10Add missing links for Error docsGuillaume Gomez-1/+4
2017-08-10Add missing links in io module docsGuillaume Gomez-4/+6
2017-08-10Add missing links in io::Error docsGuillaume Gomez-7/+11
2017-08-10Add missing links in ReadDir docsGuillaume Gomez-5/+5
2017-08-10Add missing links on File struct docsGuillaume Gomez-2/+4