about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-08-21Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJungkennytm-4/+4
Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-6/+6
Fix typos found by codespell.
2018-08-21Rollup merge of #53370 - jkozlowski:stabilize-macro_vis_matcher, r=cramertjkennytm-1/+1
Stabilize macro_vis_matcher This PR should stabilize [macro_vis_matcher](https://github.com/rust-lang/rust/issues/41022) feature. - [ ] "reference" book changes: https://github.com/rust-lang-nursery/reference/pull/400 - [ ] "Rust by example" book changes: https://github.com/rust-lang/rust-by-example/pull/1096 - [ ] "clippy" changes: https://github.com/rust-lang-nursery/rust-clippy/pull/3055 r? @cramertj
2018-08-21Add doc for impl From for AddrSon-0/+8
2018-08-21Correctly parenthesize dyn Error + 'static.Without Boats-1/+1
2018-08-20Fix feature name.Without Boats-1/+1
2018-08-20document the platform-specific behavior of Command::current_dirJack O'Connor-0/+10
2018-08-20Add Error::source method per RFC 2504.Without Boats-1/+66
2018-08-21Rollup merge of #53213 - tmccombs:stable-ipconstructors, r=KodrAuskennytm-20/+5
Stabilize IP associated constants Fixes #44582
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-4/+4
2018-08-20Add doc for impl From for ErrorSon-0/+6
2018-08-19Stabilize macro_vis_matcherJakub Kozlowski-1/+1
2018-08-19Fix typos found by codespell.Matthias Krüger-6/+6
2018-08-18Auto merge of #53436 - cuviper:trace_fn-stop, r=alexcrichtonbors-24/+30
std: stop backtracing when the frames are full This is a defensive measure to mitigate the infinite unwind loop seen in #53372. That case will still repeatedly unwind `__rust_try`, but now it will at least stop when `cx.frames` is full. r? @alexcrichton
2018-08-17Stabilize `use_extern_macros`Vadim Petrochenkov-1/+1
2018-08-16std: stop backtracing when the frames are fullJosh Stone-24/+30
2018-08-17Rollup merge of #53395 - varkor:__Nonexhaustive-to-non_exhaustive, r=shepmasterkennytm-19/+11
Use #[non_exhaustive] on internal enums This replaces `__Nonexhaustive` variants (and variants thereof) with `#[non_exhaustive]`. These were mostly unstable previously, with the exception of the `cloudabi` enums and `Level` in proc_macro: these were `#[doc(hidden)]`, so clearly intended not to be used directly. It should be safe to replace all of these.
2018-08-17Rollup merge of #53377 - cuviper:pointer-elf_size, r=alexcrichtonkennytm-1/+2
std: Use target_pointer_width for BACKTRACE_ELF_SIZE The former code used `target.contains("64")` to detect Elf64 targets, but this is inaccurate in a few cases: - `s390x-unknown-linux-gnu` is 64-bit - `sparcv9-sun-solaris` is 64-bit - `x86_64-unknown-linux-gnux32` is 32-bit Instead the `std` build script can use `CARGO_CFG_TARGET_POINTER_WIDTH` to reliably detect 64-bit targets for libbacktrace. Also update to backtrace-sys 0.1.24 for alexcrichton/backtrace-rs#122.
2018-08-15Start adding an `aarch64-pc-windows-msvc` targetAlex Crichton-4/+94
This commit adds the necessary definitions for target specs and such as well as the necessary support in libstd to compile basic `aarch64-pc-windows-msvc` binaries. The target is not currently built on CI, but it can be built locally with: ./configure --target=aarch64-pc-windows-msvc --set rust.lld ./x.py build src/libstd --target aarch64-pc-windows-msvc Currently this fails to build `libtest` due to a linker bug (seemingly in LLD?) which hasn't been investigate yet. Otherwise though with libstd you can build a hello world program (linked with LLD). I've not tried to execute it yet, but it at least links! Full support for this target is still a long road ahead, but this is hopefully a good stepping stone to get started. Points of note about this target are: * Currently defaults to `panic=abort` as support is still landing in LLVM for SEH on AArch64. * Currently defaults to LLD as a linker as I was able to get farther with it than I was with `link.exe`
2018-08-15Make cloudapi enums #[non_exhaustive]varkor-9/+9
2018-08-15Make std::io::Error #[non_exhaustive]varkor-10/+2
2018-08-15document effect of join on memory orderingRalf Jung-1/+5
2018-08-14Stabilize IP associated constantsThayne McCombs-20/+5
Fixes #44582
2018-08-14std: Use target_pointer_width for BACKTRACE_ELF_SIZEJosh Stone-1/+2
The former code used `target.contains("64")` to detect Elf64 targets, but this is inaccurate in a few cases: - `s390x-unknown-linux-gnu` is 64-bit - `sparcv9-sun-solaris` is 64-bit - `x86_64-unknown-linux-gnux32` is 32-bit Instead the `std` build script can use `CARGO_CFG_TARGET_POINTER_WIDTH` to reliably detect 64-bit targets for libbacktrace. Also update to backtrace-sys 0.1.24 for alexcrichton/backtrace-rs#122.
2018-08-14Cross reference io::copy and fs::copy in docs.Corey Farwell-0/+11
Fixes https://github.com/rust-lang/rust/issues/52524.
2018-08-14Auto merge of #52936 - felixrabe:patch-1, r=alexcrichtonbors-0/+28
Document #39364 – Panic in mpsc::Receiver::recv_timeout I can still reproduce #39364 with the example code at https://github.com/rust-lang/rust/issues/39364#issuecomment-320637702. I'm opening this PR in an attempt to document this bug as a known issue in [libstd/sync/mpsc/mod.rs](https://github.com/rust-lang/rust/blob/master/src/libstd/sync/mpsc/mod.rs). Inputs very much welcome. ([Nightly docs for `recv_timeout`.](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Receiver.html?search=#method.recv_timeout))
2018-08-14Rollup merge of #53257 - faern:ip-method-idiomatic-improvement, r=TimNNkennytm-47/+50
Idiomatic improvements to IP method Since match ergonomics and slice patterns are stable this might be more idiomatic modern Rust implementations of these methods? Or well, slice patterns with `..` are not stabilized yet, so maybe we want to specify all fields but with `_`?
2018-08-14Rollup merge of #53208 - BurntPizza:protect-the-environment, r=alexcrichtonkennytm-5/+1
Don't panic on std::env::vars() when env is null. Fixes #53200. Reviewer(s): * Do I need to do any `#[cfg()]` here? * Is this use of libc ok for a dev-dependency?
2018-08-14fixed wordingRalf Jung-1/+1
2018-08-13Window Mutex: make sure we properly initialize the SRWLockRalf Jung-0/+2
2018-08-12Rollup merge of #53273 - frewsxcv:frewsxcv-ufffd, r=GuillaumeGomezGuillaume Gomez-6/+12
Add links to std::char::REPLACEMENT_CHARACTER from docs. There are a few places where we mention the replacement character in the docs, and it could be helpful for users to utilize the constant which is available in the standard library, so let’s link to it!
2018-08-12Rollup merge of #53264 - Havvy:patch-3, r=GuillaumeGomezGuillaume Gomez-0/+33
Show that Command can be reused and remodified The prior documentation did not make it clear this was possible. I wanted to make the `list_dir` example work on Windows, but I don't know if passing "/" will error or show the root of the current volume (e.g. `C:`). r? @GuillaumeGomez
2018-08-12Rollup merge of #53231 - GuillaumeGomez:let-keyword, r=QuietMisdreavusGuillaume Gomez-1/+31
Add let keyword doc Part of #34601. r? @rust-lang/docs
2018-08-12Rollup merge of #53230 - memoryruins:nll_bootstrap_4, r=nikomatsakisGuillaume Gomez-0/+1
[nll] enable feature(nll) on various crates for bootstrap: part 4 #53172 r? @nikomatsakis
2018-08-12Rollup merge of #53165 - ↵Guillaume Gomez-2/+4
jakllsch:netbsd-ad22a005-b917-47f3-8156-f717d36f6bbe, r=estebank Add aarch64-unknown-netbsd target Depends on #53116.
2018-08-11Fix indentHavvy (Ryan Scheel)-1/+1
2018-08-11Add links to std::char::REPLACEMENT_CHARACTER from docs.Corey Farwell-6/+12
There are a few places where we mention the replacement character in the docs, and it could be helpful for users to utilize the constant which is available in the standard library, so let’s link to it!
2018-08-11Add let keyword docGuillaume Gomez-1/+31
2018-08-11Show that Command can be reused and remodifiedRyan Scheel-0/+33
The prior documentation did not make it clear this was possible.
2018-08-10Replace _.. with just .. in slice patternLinus Färnstrand-4/+4
2018-08-10Make use of match ergonomics in ip methodsLinus Färnstrand-36/+36
2018-08-10Use slice patterns to check IP octetsLinus Färnstrand-11/+14
2018-08-10[nll] libstd: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-09Auto merge of #53216 - kennytm:rollup, r=kennytmbors-0/+4
Rollup of 15 pull requests Successful merges: - #52773 (Avoid unnecessary pattern matching against Option and Result) - #53082 (Fix doc link (again)) - #53094 (Automatically expand section if url id point to one of its component) - #53106 (atomic ordering docs) - #53110 (Account for --remap-path-prefix in save-analysis) - #53116 (NetBSD: fix signedess of char) - #53179 (Whitelist wasm32 simd128 target feature) - #53183 (Suggest comma when missing in macro call) - #53207 (Add individual docs for rotate_{left, right}) - #53211 ([nll] enable feature(nll) on various crates for bootstrap) - #53214 ([nll] enable feature(nll) on various crates for bootstrap: part 2) - #53215 (Slightly refactor syntax_ext/format) - #53217 (inline some short functions) - #53219 ([nll] enable feature(nll) on various crates for bootstrap: part 3) - #53222 (A few cleanups for rustc_target)
2018-08-09Reduce code duplication in OnceAleksey Kladov-14/+18
2018-08-09Don't panic on std::env::vars() when env in null.BurntPizza-5/+1
Fixes #53200
2018-08-09Rollup merge of #53116 - jakllsch:netbsd-unsigned-char, r=alexcrichtonkennytm-0/+4
NetBSD: fix signedess of char
2018-08-09Auto merge of #53108 - RalfJung:mutex, r=alexcrichtonbors-6/+38
clarify partially initialized Mutex issues Using a `sys_common::mutex::Mutex` without calling `init` is dangerous, and yet there are some places that do this. I tried to find all of them and add an appropriate comment about reentrancy. I found two places where (I think) reentrancy can actually occur, and was not able to come up with an argument for why this is okay. Someone who knows `io::lazy` and/or `sys_common::at_exit_imp` should have a careful look at this.
2018-08-08missed oneRalf Jung-2/+2
2018-08-08avoid using the word 'initialized' to talk about that non-reentrant-capable ↵Ralf Jung-8/+9
state of the mutex