about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-02-23Rollup merge of #58595 - stjepang:make-duration-consts-associated, r=oli-obkMazdak Farrokhzad-3/+0
Turn duration consts into associated consts As suggested in https://github.com/rust-lang/rust/issues/57391#issuecomment-459658236, I'm moving `Duration` constants (`SECOND`, `MILLISECOND` and so on; currently behind unstable `duration_constants` feature) into the `impl Duration` block. cc @frewsxcv @SimonSapin
2019-02-23Rollup merge of #58453 - jethrogb:jb/sgx-panic-abort, r=nagisaMazdak Farrokhzad-0/+1
SGX target: fix panic = abort What is the difference between `no_mangle` and `rustc_std_internal_symbol`?
2019-02-22Rollup merge of #58632 - matklad:reduce-contention, r=CentrilMazdak Farrokhzad-23/+26
Make std feature list sorted This helps to avoid merge conflicts when concurrent PRs append features to the end of the list.
2019-02-22Rollup merge of #58059 - RalfJung:before_exec, r=alexcrichtonMazdak Farrokhzad-12/+56
deprecate before_exec in favor of unsafe pre_exec Fixes https://github.com/rust-lang/rust/issues/39575 As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358): > The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team. Cc @alexcrichton @rust-lang/libs how would you like to proceed?
2019-02-22Make std feature list sortedAleksey Kladov-23/+26
This helps to avoid merge conflicts when concurrent PRs append features to the end of the list.
2019-02-20Turn duration consts into associated constsStjepan Glavina-3/+0
2019-02-20Rollup merge of #58553 - scottmcm:more-ihle, r=Centrilkennytm-158/+158
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-20Rollup merge of #58551 - ssomers:master, r=oli-obkkennytm-2/+6
Explain a panic in test case net::tcp::tests::double_bind Those who try to build libstd on the Windows Subsystem for Linux experience a single failing test, where the point of failure is an explicit but anonymous panic, as reported in https://github.com/rust-lang/rust/issues/49367 This commit somewhat explains why and allows diagnosing a little.
2019-02-20Rollup merge of #58539 - aaronstillwell:master, r=Mark-Simulacrumkennytm-0/+81
Add alias methods to PathBuf for underlying OsString (#58234) Implemented the following methods on PathBuf which forward to the underlying OsString. - capacity - with_capacity - clear - reserve - reserve_exact - shrink_to_fit - shrink_to These methods have been documented with reference to the original docs for `OsString`. @Mark-Simulacrum please let me know if you feel this does not suffice. Further, I've not yet included tests for these definitions - please advise on how comprehensive tests need to be for methods such as these that simply alias other (already tested) methods. (This PR addresses issue #58234)
2019-02-20Rollup merge of #58530 - scottmcm:monomorphize-less, r=TimNNkennytm-9/+18
Monomorphize less code in fs::{read|write} Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
2019-02-20Rollup merge of #58392 - scottmcm:less-shifting-in-net-ip, r=oli-obkkennytm-25/+58
Use less explicit shifting in std::net::ip Now that we have `{to|from}_be_bytes` the code can be simpler. (Inspired by PR #57740)
2019-02-18Fixed doc example for Path::with_capacityAaron Stillwell-1/+2
2019-02-17Use more impl header lifetime elisionScott McMurray-158/+158
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-18Auto merge of #58373 - RalfJung:maybe-uninit, r=gnzlbgbors-1/+6
update stdsimd and remove now-unused MaybeUninit::into_inner That's a huge diff for stdsimd... Cc @gnzlbg @alexcrichton
2019-02-18Merge remote-tracking branch 'upstream/master'Stein Somers-816/+1085
2019-02-18Explain a panic in test case net::tcp::tests::double_bindStein Somers-2/+6
2019-02-17Changed feature gate for new PathBuf methodsAaron Stillwell-7/+7
Feature gate changed to `path_buf_capacity` as per advice from @Mark-Simulacrum
2019-02-17Fixes for implementation of PathBuf methods (aliases for OsString)Aaron Stillwell-19/+19
- Fixed incorrect `mut` usage - Fixed style in accordance with tidy - Marked all methods as unstable - Changed feature identifier to path_buf_alias_os_string_methods
2019-02-17Add alias methods to PathBuf for underlying OsStringAaron Stillwell-1/+81
Implemented the following methods on PathBuf which forward to the underlying OsString. - capacity - with_capacity - clear - reserve - reserve_exact - shrink_to_fit - shrink_to
2019-02-16Monomorphize less code in fs::{read|write}Scott McMurray-9/+18
Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
2019-02-17Rollup merge of #58521 - sfackler:error-iter-issue, r=withoutboatskennytm-4/+4
Fix tracking issue for error iterators
2019-02-17Rollup merge of #58496 - nathan:doc-std-path-pathbuf-pop, r=frewsxcvkennytm-2/+1
Fix documentation for std::path::PathBuf::pop Closes #58474.
2019-02-17Rollup merge of #58395 - vi:checked_duration_since, r=dtolnaykennytm-0/+61
Instant::checked_duration_since
2019-02-16Fix tracking issue for error iteratorsSteven Fackler-4/+4
2019-02-16Rollup merge of #58438 - cuviper:posix_spawn_file_actions_addchdir_np, ↵kennytm-2/+22
r=alexcrichton Use posix_spawn_file_actions_addchdir_np when possible This is a non-POSIX extension implemented in Solaris and in glibc 2.29. With this we can still use `posix_spawn()` when `Command::current_dir()` has been set, otherwise we fallback to `fork(); chdir(); exec()`.
2019-02-15Fix documentation for std::path::PathBuf::popNathan-2/+1
Closes #58474.
2019-02-14update stdsimdRalf Jung-1/+2
2019-02-14fixed for libstd buildRalf Jung-1/+5
2019-02-14SGX target: fix panic = abortJethro Beekman-0/+1
2019-02-14Rollup merge of #57992 - Matthias247:waker4, r=cramertjMazdak Farrokhzad-15/+13
Update the future/task API This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592. Changes: - Replacing UnsafeWake with RawWaker and RawWakerVtable - Removal of LocalWaker - Removal of Arc-based Wake trait
2019-02-14Rollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnikMazdak Farrokhzad-4/+4
Convert old first edition links to current edition one r? @steveklabnik
2019-02-13Use posix_spawn_file_actions_addchdir_np when possibleJosh Stone-2/+22
This is a non-POSIX extension implemented in Solaris and in glibc 2.29. With this we can still use `posix_spawn()` when `Command::current_dir()` has been set, otherwise we fallback to `fork(); chdir(); exec()`.
2019-02-13Convert old doc links to current editionLzu Tao-4/+4
Use footnote style to bypass the tidy check
2019-02-13Add Instant::saturating_duration_sinceVitaly _Vi Shukela-0/+28
2019-02-13Fix tests for checked_duration_sinceVitaly _Vi Shukela-1/+3
2019-02-13Auto merge of #58235 - jethrogb:jb/sgx-usercall-internals, r=alexcrichtonbors-84/+59
SGX target: simplify usercall internals This moves logic from assembly to Rust and removes the special case for exit/panic handling, merging it with regular usercall handling. Also, this fixes a bug in the exit usercall introduced in a75ae00. The bug would make regular exits look like panics with high probability. It would also with some probability leak information through uncleared registers. cc @VardhanThigle r? @alexcrichton
2019-02-12Merging masterMatthias Einwag-700/+764
2019-02-13Rollup merge of #58289 - haraldh:master, r=sfacklerMazdak Farrokhzad-0/+152
impl iter() for dyn Error Examples: ```rust let next_error_type_a = err .iter() .filter_map(Error::downcast_ref::<ErrorTypeA>) .next(); ``` ```rust let source_root_error = err.iter().last(); ``` Credit for the ErrorIter goes to reddit user /u/tdiekmann (Tim Diekmann) https://www.reddit.com/r/rust/comments/aj3lpg/is_an_iterator_impl_over_errorsource_possible/
2019-02-13Rollup merge of #58034 - faern:stabilize-time-checked-add, r=alexcrichtonMazdak Farrokhzad-8/+8
Stabilize the time_checked_add feature Closes #55940 Stabilizes `checked_add` and `checked_sub` on `Instant` and `SystemTime`.
2019-02-13Rollup merge of #57693 - king6cong:word, r=CentrilMazdak Farrokhzad-1/+1
Doc rewording None
2019-02-13Add Instant::checked_duration_since, address #58402.Vitaly _Vi Shukela-0/+31
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-259/+264
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkovbors-423/+435
Require a list of features in `#[allow_internal_unstable]` The blanket-permission slip is not great and will likely give us trouble some point down the road.
2019-02-12Doc rewordingking6cong-1/+1
2019-02-11Use less explicit shifting in std::net::ipScott McMurray-25/+58
Now that we have {to|from}_be_bytes the code can be simpler. (Inspired by PR #57740)
2019-02-11remove "experimental" wording from std::os::unixAndy Russell-1/+1
2019-02-11Fiddle through the module visibilities for testsOliver Scherer-8/+8
2019-02-11Move out tests of a deprecated module to work around `#[test]` bugsOliver Scherer-414/+416
https://github.com/rust-lang/rust/issues/47238
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-8/+18
2019-02-10libs: doc commentsAlexander Regueiro-212/+217