about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2018-08-08Use repr(align(x)) for redox in6_addrLinus Färnstrand-1/+1
2018-08-08Simplify Ipv6Addr::from(octets) to not use unsafeLinus Färnstrand-3/+1
2018-08-08Simplify is_broadcastLinus Färnstrand-2/+1
2018-08-08Add Ipv4Addr BROADCAST assoc constLinus Färnstrand-0/+18
2018-08-08Move IPs to assoc constsLinus Färnstrand-28/+21
2018-08-08Make Ipv{4,6}Addr::new const fnsLinus Färnstrand-20/+30
2018-08-07Add aarch64-unknown-netbsd targetJonathan A. Kollasch-2/+4
2018-08-07"Panics" -> "Known Issues"; rm trailing WSFelix Rabe-2/+2
2018-08-07Less words better than moar wordsFelix Rabe-2/+2
2018-08-07RephraseFelix Rabe-2/+2
2018-08-07Document panic in mpsc::Receiver::recv_timeoutFelix Rabe-1/+23
2018-08-07Rollup merge of #53107 - RalfJung:static-mutex, r=alexcrichtonkennytm-9/+4
Remove references to `StaticMutex` which got removed a while ago `StaticMutex` got removed two years ago with https://github.com/rust-lang/rust/pull/34705, but still got referenced in some comments and even an error explanation.
2018-08-06NetBSD: fix signedess of charJonathan A. Kollasch-0/+4
2018-08-06actually, reentrant uninitialized mutex acquisition is outright UBRalf Jung-21/+15
2018-08-06argue why at_exit_imp is fineRalf Jung-3/+3
2018-08-06make Lazy::new unsafe and check reentrancy condition in the callersRalf Jung-5/+11
2018-08-06I think we have to strengthen Mutex::init UBRalf Jung-1/+1
2018-08-06clarify partially initialized Mutex issuesRalf Jung-2/+33
2018-08-06Remove references to `StaticMutex` which got removed a while agoRalf Jung-9/+4
2018-08-05Remove bad features after rebasevarkor-1/+0
2018-08-05Fix stage 2 testsvarkor-1/+1
2018-08-05Remove unnecessary or invalid feature attributesvarkor-17/+1
2018-08-04Rollup merge of #53024 - matklad:patch-1, r=alexcrichtonkennytm-0/+4
Specify reentrancy gurantees of `Once::call_once` I don't think the docs are clear about what happens in the following code ```rust static INIT: Once = ONCE_INIT; INIT.call_once(|| INIT.call_once(|| println!("huh?"))); ``` [Playground](https://play.rust-lang.org/?gist=15dde1f68a6ede263c7250c36977eade&version=stable&mode=debug&edition=2015) Let's "specify" the behavior to make it clear that the current behavior (deadlock I think?) is not a strict guarantee.
2018-08-03Fix trailnig WSAleksey Kladov-1/+1
2018-08-03Allow to check if sync::Once is initializedAleksey Kladov-0/+41
2018-08-03Specify reentrancy gurantees of `Once::call_once`Aleksey Kladov-0/+4
2018-08-02Remove unnecessary local in await! macroTaylor Cramer-8/+11
2018-08-02Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichtonbors-14/+3
Switch to bootstrapping from 1.29 beta r? @alexcrichton
2018-08-02Auto merge of #52847 - upsuper:thread-stack-reserve, r=alexcrichtonbors-1/+4
Don't commit thread stack on Windows On Windows, there is a system level resource limitation called commit limit, which is roughly the sum of physical memory + paging files[1]. `CreateThread` by default commits the stack size[2], which unnecessarily takes such resource from the shared limit. This PR changes it to only reserve the stack size rather than commit it. Reserved memory would only take the address space of the current process until it's actually accessed. This should make the behavior on Windows match other platforms, and is also a pretty standard practice on Windows nowadays. [1] https://blogs.technet.microsoft.com/markrussinovich/2008/11/17/pushing-the-limits-of-windows-virtual-memory/ [2] https://docs.microsoft.com/zh-cn/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createthread
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-14/+3
2018-08-01Implement custom read_to_end for io::Takeljedrz-3/+16
2018-08-01Rollup merge of #52861 - ColinFinck:master, r=alexcrichtonPietro Albini-14/+469
Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" (https://github.com/rust-lang/libc/pull/1048) and llvm (https://github.com/rust-lang/llvm/pull/122), this enables HermitCore applications to be written in Rust.
2018-08-01Rollup merge of #52771 - matklad:patch-1, r=kennytmPietro Albini-1/+4
Clarify thread::park semantics It took me quite some time to realize that the example is not actually racy, so let's clarify it? :-)
2018-08-01Rollup merge of #52732 - SimonSapin:spring, r=Mark-SimulacrumPietro Albini-525/+0
Remove unstable and deprecated APIs
2018-08-01Rollup merge of #52340 - cypher:document-from-trait-in-ffi, r=steveklabnikPietro Albini-0/+48
Document From trait implementations for OsStr, OsString, CString, and CStr As part of issue #51430 (cc @skade). The allocation and copy claims should be double-checked. r? @steveklabnik
2018-08-01Document #39364 (WIP)Felix Rabe-0/+6
2018-07-31Fix coding style.Colin Finck-1/+4
2018-07-30Remove unstable and deprecated APIsSimon Sapin-524/+0