about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-03-20Rollup merge of #49139 - sfackler:bufreader-buffer, r=SimonSapinkennytm-1/+29
Add BufReader::buffer This subsumes the need for an explicit is_empty function, and provides access to the buffered data itself which has been requested from time to time. We could call this `buf` to match `fill_buf`, but I think I'd prefer `fill_buffer` anyways in hindsight.
2018-03-19Auto merge of #49108 - SimonSapin:sip, r=TimNNbors-2/+1
Remove or hide deprecated unstable SipHasher{13,24} Deprecated since Rust 1.13.0.
2018-03-18Add BufReader::bufferSteven Fackler-1/+29
This subsumes the need for an explicit is_empty function, and provides access to the buffered data itself which has been requested from time to time.
2018-03-17Mark deprecated unstable SipHasher13 as a doc-hidden impl detail of HashMap.Simon Sapin-2/+1
It stays in libcore rather than being private in HashMap’s module because it shares code with the deprecated *stable* `SipHasher` type.
2018-03-16Auto merge of #48896 - alexcrichton:bitcode-in-object, r=michaelwoeristerbors-1/+2
rustc: Enable embedding LLVM bitcode for iOS 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-16Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichtonbors-1/+56
Make `assert` a built-in procedural macro Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838).
2018-03-16Auto merge of #49051 - kennytm:rollup, r=kennytmbors-4/+19
Rollup of 17 pull requests - Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972 - Failed merges:
2018-03-16Rollup merge of #48853 - Songbird0:addrparseerror_documentation_improvement, ↵kennytm-0/+19
r=GuillaumeGomez Improve `AddrParseError` documentation. I've added potential cause to `AddrParseError` raising.
2018-03-15Improve `AddrParseError` documentation.Anthony Defranceschi-0/+19
Add a potential cause to `AddrParseError` raising.
2018-03-15setting ABORTING_MALLOC for asmjs backendsnf-4/+0
2018-03-15Auto merge of #47813 - kennytm:stable-incl-range, r=nrcbors-1/+0
Stabilize inclusive range (`..=`) Stabilize the followings: * `inclusive_range` — The `std::ops::RangeInclusive` and `std::ops::RangeInclusiveTo` types, except its fields (tracked by #49022 separately). * `inclusive_range_syntax` — The `a..=b` and `..=b` expression syntax * `dotdoteq_in_patterns` — Using `a..=b` in a pattern cc #28237 r? @rust-lang/lang
2018-03-15Stabilize `inclusive_range` library feature.kennytm-1/+0
Stabilize std::ops::RangeInclusive and std::ops::RangeInclusiveTo.
2018-03-15Auto merge of #48648 - snf:fallible_allocation, r=Kimundibors-29/+132
Fallible allocation Implementing RFC#2116 [Fallible Allocation](https://github.com/rust-lang/rust/issues/48043) . Work in progress. Initially adding @Gankro's try_reserve for Vec.
2018-03-14try_reserve: disabling tests for asmjs, blocked by #48968snf-0/+4
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-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-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-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-02-28Fix linkcheckerScott McMurray-2/+2
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