about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2017-08-10Fix cross-crate global allocators on windowsAidan Hobson Sayers-4/+10
2017-08-10Auto merge of #43582 - ivanbakel:unused_mut_ref, r=arielb1bors-9/+9
Fixed mutable vars being marked used when they weren't #### NB : bootstrapping is slow on my machine, even with `keep-stage` - fixes for occurances in the current codebase are <s>in the pipeline</s> done. This PR is being put up for review of the fix of the issue. Fixes #43526, Fixes #30280, Fixes #25049 ### Issue Whenever the compiler detected a mutable deref being used mutably, it marked an associated value as being used mutably as well. In the case of derefencing local variables which were mutable references, this incorrectly marked the reference itself being used mutably, instead of its contents - with the consequence of making the following code emit no warnings ``` fn do_thing<T>(mut arg : &mut T) { ... // don't touch arg - just deref it to access the T } ``` ### Fix Make dereferences not be counted as a mutable use, but only when they're on borrows on local variables. #### Why not on things other than local variables? * Whenever you capture a variable in a closure, it gets turned into a hidden reference - when you use it in the closure, it gets dereferenced. If the closure uses the variable mutably, that is actually a mutable use of the thing being dereffed to, so it has to be counted. * If you deref a mutable `Box` to access the contents mutably, you are using the `Box` mutably - so it has to be counted.
2017-08-10Fix typo corersponding -> correspondingFoucher-1/+1
2017-08-10Exposed all platform-specific documentation.kennytm-30/+75
2017-08-10Auto merge of #43735 - est31:master, r=alexcrichtonbors-2/+14
Avoid calling the column!() macro in panic Closes #43057 This "fix" adds a new macro called `__rust_unstable_column` and to use it instead of the `column` macro inside panic. The new macro can be shadowed as well as `column` can, but its very likely that there is no code that does this in practice. There is no real way to make "unstable" macros that are usable by stable macros, so we do the next best thing and prefix the macro with `__rust_unstable` to make sure people recognize it is unstable. r? @alexcrichton
2017-08-09Fix grammarSteven Fackler-1/+1
2017-08-09Auto merge of #43588 - dns2utf8:wrapping_add, r=sfacklerbors-1/+1
Use explicit wrapping_add … … to prevent potential unexpected behavior on debug builds.
2017-08-09Fix errors on WindowsAriel Ben-Yehuda-2/+2
2017-08-08Instant is monotonically nondecreasingSteven Fackler-2/+2
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-08Use explicit wrapping_add to prevent potential unexpected behavior on debug ↵Stefan Schindler-1/+1
builds
2017-08-08Avoid calling the column!() macro in panicest31-2/+14
2017-08-07Make a disable-jemalloc build workAidan Hobson Sayers-0/+10
Fixes #43510
2017-08-07addrinfo hint in lookup_host() needs clean initialization on all platformsDanek Duvall-10/+2
Fixes #43649
2017-08-07Stop using URL shortener in docsOliver Middleton-1/+1
tidy will no longer complain about long lines containing links so there is no reason to use a URL shortener here.
2017-08-03Simplify Redox backtrace/ to not include non-Redox implementationsIan Douglas Scott-207/+3
2017-08-04Auto merge of #43634 - dhduvall:solaris-test-fixes, r=sanxiynbors-6/+1
Fix a number of failing tests on Solaris and SPARC
2017-08-03Make backtraces work on Redox, copying Unix implementationIan Douglas Scott-33/+364
2017-08-04Auto merge of #43459 - ids1024:asrawfd, r=alexcrichtonbors-0/+55
Implement AsRawFd for Stdin, Stdout, and Stderr https://github.com/rust-lang/rfcs/issues/2074
2017-08-03Fix AsRawHandleIan Douglas Scott-3/+3
2017-08-03Fix a dangling symlink bug in `remove_dir_all()` on SolarisDanek Duvall-6/+1
This fixes a handful of long-failing tests.
2017-08-03Implement AsRawHandle for Std* on WindowsIan Douglas Scott-0/+22
2017-08-03Auto merge of #43619 - frewsxcv:frewsxcv-thread, r=QuietMisdreavusbors-1/+8
Thread docs fix and improvements. None