about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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-15Fix SECURITY_SQOS_PRESENT missingPaul Dicker-2/+5
if security_qos_flags(SECURITY_ANONYMOUS) is set
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-13Add a tracking issueSteven Fackler-11/+11
2019-02-13impl Deref/DerefMut for IoVec typesSteven Fackler-47/+53
Returning &'a mut [u8] was unsound, and we may as well just have them directly deref to their slices to make it easier to work with them.
2019-02-13Add vectored read and write supportSteven Fackler-92/+1033
This functionality has lived for a while in the tokio ecosystem, where it can improve performance by minimizing copies.
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-13Return without a reference in unix Weak::get()Josh Stone-5/+4
2019-02-13Avoid allocation in std::sys::unix::weakJosh Stone-3/+3
If we add a terminating NUL to the name in the `weak!` macro, then `fetch()` can use `CStr::from_bytes_with_nul()` instead of `CString`.
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-13Stabilize TryFrom and TryIntoSimon Sapin-4/+3
2019-02-13Add a convert::Infallible empty enum, make string::ParseError an aliasSimon Sapin-2/+1
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-13Relax Read bounds on a bunch of BufReader<R> methodsAnthony Ramine-0/+2
2019-02-13Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S>Anthony Ramine-354/+343
Notably, hash iterators don't require any trait bounds to be iterated.
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
2019-02-10tests: doc commentsAlexander Regueiro-47/+47
2019-02-10Auto merge of #58361 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-5/+4
Rollup of 16 pull requests Successful merges: - #57259 (Update reference of rlibc crate to compiler-builtins crate) - #57740 (Use `to_ne_bytes` for converting IPv4Addr to octets) - #57926 (Tiny expansion to docs for `core::convert`.) - #58157 (Add Cargo.lock automatically adding message) - #58203 (rustdoc: display sugared return types for async functions) - #58243 (Add trait alias support in rustdoc) - #58262 (Add #[must_use] message to Fn* traits) - #58295 (std::sys::unix::stdio: explain why we do into_raw) - #58297 (Cleanup JS a bit) - #58317 (Some writing improvement, conciseness of intro) - #58324 (miri: give non-generic functions a stable address) - #58332 (operand-to-place copies should never be overlapping) - #58345 (When there are multiple filenames, print what got interpreted as filenames) - #58346 (rpath computation: explain why we pop()) - #58350 (Fix failing tidy (line endings on Windows)) - #58352 (miri value visitor: use `?` in macro) Failed merges: r? @ghost
2019-02-10Rollup merge of #58295 - RalfJung:stdio, r=alexcrichtonGuillaume Gomez-3/+3
std::sys::unix::stdio: explain why we do into_raw I was quite puzzled why someone would call `into_raw` and then ignore the result.
2019-02-10Rollup merge of #57740 - JakubOnderka:ipv4addr-to_ne_bytes, r=scottmcmGuillaume Gomez-2/+1
Use `to_ne_bytes` for converting IPv4Addr to octets It is easier and it should be also faster, because [`to_ne_bytes`](https://doc.rust-lang.org/std/primitive.u32.html#method.to_ne_bytes) just calls `mem::transmute`.
2019-02-10Auto merge of #58129 - RalfJung:maybe-uninit, r=cramertjbors-2/+2
MaybeUninit: some docs, rename into_inner -> into_initialized, return &mut from set
2019-02-10fix SGX build failuresRalf Jung-2/+2
2019-02-09impl iter_sources() and iter_chain() for dyn ErrorHarald Hoyer-0/+152
Examples: ```rust let next_error_type_a = err .iter_chain() .filter_map(Error::downcast_ref::<ErrorTypeA>) .next(); ``` ```rust let source_root_error = err.iter_chain().last(); ``` Credit for the ErrorIter goes to Tim Diekmann https://www.reddit.com/r/rust/comments/aj3lpg/is_an_iterator_impl_over_errorsource_possible/
2019-02-08std::sys::unix::stdio: explain why we do into_rawRalf Jung-3/+3
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-07Rollup merge of #58136 - abonander:doc-win-stdio-unicode, r=dtolnaykennytm-1/+48
Improve error message and docs for non-UTF-8 bytes in stdio on Windows This should make debugging problems like abonander/multipart#106 significantly more straightforward in the future. cc #23344, @retep998 @alexcrichton Not sure who do r? so I'll let rust-highfive pick one.
2019-02-06SGX target: simplify usercall internalsJethro Beekman-84/+59
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.
2019-02-06Rollup merge of #58182 - jethrogb:jb/sgx-bytebuffer-len-0, r=joshtriplettkennytm-3/+9
SGX target: handle empty user buffers correctly Also, expose correct items in `os::fortanix_sgx::usercalls::alloc` * [read_alloc documentation](https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.read_alloc) * [Clarified ByteBuffer documentation](https://github.com/fortanix/rust-sgx/pull/94/files#diff-ca843ad9e25cacd63a80579c0f7efa56) r? @joshtriplett