about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-03-14implementing fallible allocation API (try_reserve) for Vec, String and HashMapsnf-29/+128
2018-03-14change never_type stabilisation versionAndrew Cann-1/+1
2018-03-14Fix version numberAndrew Cann-1/+1
2018-03-14stabilise feature(never_type)Andrew Cann-8/+8
Replace feature(never_type) with feature(exhaustive_patterns). feature(exhaustive_patterns) only covers the pattern-exhaustives checks that used to be covered by feature(never_type)
2018-03-13Auto merge of #48735 - 1011X:master, r=alexcrichtonbors-477/+2
Move ascii::escape_default to libcore As requested in #46409, the `ascii::escape_default` method has been added to the core library. All I did was copy over the `std::ascii` module file, remove the (redundant) `AsciiExt` trait, and change some of the documentation to match. None of the tests were changed. I wasn't sure how to handle the annotations. For `EscapeDefault` and `escape_default()`, I changed them to `#[unstable(feature = "core_ascii", issue = "46409")]`. Is that alright? Or should I leave them as they were?
2018-03-13rustc: Embed LLVM bitcode by default on iOSAlex Crichton-1/+2
This commit updates rustc to embed bitcode in each object file generated by default when compiling for iOS. This was determined in #35968 as a step towards better compatibility with the iOS toolchain, so let's give it a spin and see how it turns out! Note that this also updates the `cc` dependency which should propagate this change of embedding bitcode for C dependencies as well.
2018-03-13rustbuild: Tweak CFLAGS to various libstd piecesAlex Crichton-1/+1
* Pass `opt_level(2)` when calculating CFLAGS to get the right flags on iOS * Unconditionally pass `-O2` when compiling libbacktrace This should... Close #48903 Close #48906
2018-03-13Rollup merge of #48480 - jethrogb:patch-5, r=alexcrichtonkennytm-0/+4
Clarify interfaction between File::set_len and file cursor
2018-03-11Remove "and may change between Rust releases"Phlosioneer-11/+11
2018-03-11Update Cargo submoduleAlex Crichton-1/+96
Required moving all fulldeps tests depending on `rand` to different locations as now there's multiple `rand` crates that can't be implicitly linked against.
2018-03-11Document when types have OS-dependent sizesPhlosioneer-0/+33
As per issue #43601, types that can change size depending on the target operating system should say so in their documentation. I used this template when adding doc comments: The size of a(n) <name> struct may vary depending on the target operating system, and may change between Rust releases. For enums, I used "instance" instead of "struct".
2018-03-08Rollup merge of #48857 - Songbird0:improve_column_macro_documentation, ↵Manish Goregaokar-1/+1
r=joshtriplett Modify part of `column!` documentation. Just like `line!` documentation, I've replaced: > The returned column is not the invocation of the `column!` macro itself By > The returned column is *not necessarily* the line of the `column!` invocation itself See #46997.
2018-03-08Rollup merge of #48856 - Songbird0:improve_line_macro_documentation, ↵Manish Goregaokar-1/+1
r=joshtriplett Modify part of `line!` documentation. In accordance with #46997, I've replaced: > The returned line is not the invocation of the line! macro itself [...] By > The returned line is *not necessarily* the line of the `line!` invocation itself [...]
2018-03-09Modify part of `column!` documentation.Anthony Defranceschi-1/+1
Just like `line!` documentation, I've replaced: > The returned column is not the invocation of the `column!` macro itself By > The returned column is *not necessarily* the line of the `column!` invocation itself See #46997.
2018-03-09Modify part of `line!` documentation.Anthony Defranceschi-1/+1
In accordance with #46997, I've replaced: > The returned line is not the invocation of the line! macro itself [...] By > The returned line is *not necessarily* the line of the `line!` invocation itself [...]
2018-03-08Rollup merge of #48292 - topecongiro:from_str-for-path-and-pathbuf, ↵Manish Goregaokar-0/+27
r=alexcrichton Implement FromStr for PathBuf Closes #44431.
2018-03-07Make `assert` macro a built-in procedural macroShotaro Yamada-1/+56
2018-03-06Rollup merge of #48618 - scottmcm:elaborate-exitcode, r=alexcrichtonAlex Crichton-31/+107
Better docs and associated SUCCESS/FAILURE for process::ExitCode Follow-up to https://github.com/rust-lang/rust/pull/48497#discussion_r170676525, since that PR was the minimal thing to unblock https://github.com/rust-lang/rust/issues/48453#issuecomment-368155082. r? @nikomatsakis
2018-03-06Merge branch 'master' of https://github.com/rust-lang/rust1011X-61/+57
2018-03-06Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichtonkennytm-19/+18
Stabilize FusedIterator FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate. Closes #35602
2018-03-06Rollup merge of #48507 - GuillaumeGomez:cstr-note, r=steveklabnikkennytm-0/+2
Add new warning for CStr::from_ptr Fixes #48401.
2018-03-06Rollup merge of #48754 - leodasvacas:while-let-all-the-things, r=rkruppekennytm-14/+9
while let all the things
2018-03-05Remove unnecessary imports1011X-4/+0
2018-03-05Move tests, re-export items from core::ascii1011X-474/+3
2018-03-05while let all the thingsleonardo.yvens-14/+9
2018-03-05Remove a couple of `isize` references from hashmap docsTobias Bucher-29/+29
Also fix a spelling mistake.
2018-03-06Implement FromStr for PathBuftopecongiro-0/+27
2018-03-03Move process::ExitCode internals to sysScott McMurray-24/+72
Now begins the saga of fixing compilation errors on other platforms...
2018-03-04Rollup merge of #48513 - alexcrichton:simd, r=JoshTriplettkennytm-0/+30
std: Add `arch` and `simd` modules This commit imports the `stdsimd` crate into the standard library, creating an `arch` and `simd` module inside of both libcore and libstd. Both of these modules are **unstable** and will continue to be so until RFC 2335 is stabilized. As a brief recap, the modules are organized as so: * `arch` contains all current architectures with intrinsics, for example `std::arch::x86`, `std::arch::x86_64`, `std::arch::arm`, etc. These modules contain all of the intrinsics defined for the platform, like `_mm_set1_epi8`. * In the standard library, the `arch` module also exports a `is_target_feature_detected` macro which performs runtime detection to determine whether a target feature is available at runtime. * The `simd` module contains experimental versions of strongly-typed lane-aware SIMD primitives, to be fully fleshed out in a future RFC. The main purpose of this commit is to start pulling in all these intrinsics and such into the standard library on nightly and allow testing and such. This'll help allow users to easily kick the tires and see if intrinsics work as well as allow us to test out all the infrastructure for moving the intrinsics into the standard library.
2018-03-03core: Update stability attributes for FusedIteratorUlrik Sverdrup-18/+18
2018-03-03core: Stabilize FusedIteratorUlrik Sverdrup-18/+17
FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate.
2018-03-02Rollup merge of #48328 - frewsxcv:frewsxcv-clarify-error-zero-duration, ↵Manish Goregaokar-14/+134
r=sfackler Fixes #47311. r? @nrc
2018-03-02std: Add `arch` and `simd` modulesAlex Crichton-0/+30
This commit imports the `stdsimd` crate into the standard library, creating an `arch` and `simd` module inside of both libcore and libstd. Both of these modules are **unstable** and will continue to be so until RFC 2335 is stabilized. As a brief recap, the modules are organized as so: * `arch` contains all current architectures with intrinsics, for example `std::arch::x86`, `std::arch::x86_64`, `std::arch::arm`, etc. These modules contain all of the intrinsics defined for the platform, like `_mm_set1_epi8`. * In the standard library, the `arch` module also exports a `is_target_feature_detected` macro which performs runtime detection to determine whether a target feature is available at runtime. * The `simd` module contains experimental versions of strongly-typed lane-aware SIMD primitives, to be fully fleshed out in a future RFC. The main purpose of this commit is to start pulling in all these intrinsics and such into the standard library on nightly and allow testing and such. This'll help allow users to easily kick the tires and see if intrinsics work as well as allow us to test out all the infrastructure for moving the intrinsics into the standard library.
2018-03-02Support posix_spawn() for Linux glibc 2.24+.Bryan Drewery-2/+16
The relevant support was added in https://sourceware.org/bugzilla/show_bug.cgi?id=10354#c12
2018-03-02Move glibc version lookup handling to sys::os and add a simpler glibc_version()Bryan Drewery-28/+37
2018-03-02Use _Bryan Drewery-1/+1
2018-03-01Rollup merge of #48585 - stjepang:stabilize-localkey-try_with, r=alexcrichtonManish Goregaokar-134/+38
Stabilize LocalKey::try_with The `LocalKey::try_with` method is now stabilized. `LocalKey::state` and `LocalKeyState` marked as deprecated. Although, is there any reason to keep them - should we perhaps remove them completely? Closes #27716 r? @alexcrichton
2018-03-01Add comment explaining when posix_spawn() can be supported.Bryan Drewery-0/+2
2018-03-01posix_spawn() on OSX supports returning ENOENT.Bryan Drewery-2/+2
2018-02-28Fix linkcheckerScott McMurray-2/+2
2018-02-28posix_spawn() always returns its error rather than setting errno.Bryan Drewery-1/+1
2018-02-28Support posix_spawn() for FreeBSD.Bryan Drewery-2/+2
spawn() is expected to return an error if the specified file could not be executed. FreeBSD's posix_spawn() supports returning ENOENT/ENOEXEC if the exec() fails, which not all platforms support. This brings a very significant performance improvement for FreeBSD, involving heavy use of Command in threads, due to fork() invoking jemalloc fork handlers and causing lock contention. FreeBSD's posix_spawn() avoids this problem due to using vfork() internally.
2018-02-28Remove excess newlineBryan Drewery-1/+0
2018-02-28Pass proper pointer for envp.Bryan Drewery-1/+1
2018-02-28No need to zero when an initializer for the object is already used.Bryan Drewery-3/+3
2018-02-28Avoid error for unused variablesBryan Drewery-1/+1
2018-02-28Support posix_spawn() when possible.Alex Crichton-0/+102
2018-02-28Rollup merge of #48420 - teiesti:path_parents, r=BurntSushiManish Goregaokar-0/+75
Fixes #47311. r? @nrc
2018-02-28Rollup merge of #48380 - nikomatsakis:issue-48251-master, r=acrichtoManish Goregaokar-2/+4
Fixes #47311. r? @nrc
2018-03-01Fix a bug introduced in previous commitStjepan Glavina-8/+5