summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2019-02-05Expose correct items in `os::fortanix_sgx::usercalls::alloc`Jethro Beekman-1/+1
2019-02-05SGX target: handle empty user buffers correctlyJethro Beekman-2/+8
2019-02-04Remove stray FIXMEJethro Beekman-3/+0
2019-02-03Improve error message and docs for non-UTF-8 bytes in stdio on WindowsAustin Bonander-1/+48
cc #23344
2019-02-03Update the future/task APIMatthias Einwag-15/+13
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-03Auto merge of #57922 - davidtwco:issue-57410, r=petrochenkovbors-0/+2
Update visibility of intermediate use items. Fixes #57410 and fixes #53925 and fixes #47816. Currently, the target of a use statement will be updated with the visibility of the use statement itself (if the use statement was visible). This PR ensures that if the path to the target item is via another use statement then that intermediate use statement will also have the visibility updated like the target. This silences incorrect `unreachable_pub` lints with inactionable suggestions.
2019-02-03POSIX requires async signal safety for fork in signal handlers, not in generalRalf Jung-4/+2
2019-02-03more formattingRalf Jung-4/+8
2019-02-03Auto merge of #58043 - jethrogb:jb/sgx-usercallnrs, r=joshtriplettbors-20/+10
Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs` It was 0-indexed but should be 1-indexed. This PR just removes the duplicate code and re-exports the internal enum. Fixes https://github.com/fortanix/rust-sgx/issues/88 r? @joshtriplett
2019-02-02Update visibility of intermediate use items.David Wood-0/+2
Currently, the target of a use statement will be updated with the visibility of the use statement itself (if the use statement was visible). This commit ensures that if the path to the target item is via another use statement then that intermediate use statement will also have the visibility updated like the target. This silences incorrect `unreachable_pub` lints with inactionable suggestions.
2019-02-02pre_exec: expand docsRalf Jung-6/+8
2019-02-02deprecate things a bit slowerRalf Jung-2/+2
2019-02-01also replace before_exec by pre_exec on redoxRalf Jung-6/+26
2019-02-01deprecate before_exec in favor of unsafe pre_execRalf Jung-4/+24
2019-02-01Stabilize std::error::Error::type_idSimon Sapin-3/+1
This should have been part of https://github.com/rust-lang/rust/pull/57834 FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
2019-02-01Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`Jethro Beekman-20/+10
Fixes https://github.com/fortanix/rust-sgx/issues/88
2019-01-31Simplify lambdasLinus Färnstrand-4/+4
2019-01-31Stabilize the time_checked_add featureLinus Färnstrand-4/+4
2019-01-31Rollup merge of #57971 - jethrogb:jb/sgx-panic, r=alexcrichtonMazdak Farrokhzad-22/+32
SGX target: improve panic & exit handling Implement this part of the spec: > The enclave must not rely on userspace to terminate other threads still running. Similarly, the enclave must not trust that it will no longer be entered by userspace, and it must safeguard against that in the entrypoints. Also use `UserRef` to access panic buffer r? @alexcrichton cc @VardhanThigle
2019-01-29Auto merge of #57808 - gnzlbg:ustdsimd, r=gnzlbgbors-17/+113
Update stdsimd This is the companion PR to https://github.com/rust-lang-nursery/stdsimd/pull/640 r? @alexcrichton
2019-01-29SGX target: improve panic & exit handlingJethro Beekman-22/+32
2019-01-29Update stdsimdgnzlbg-17/+113
2019-01-28Rollup merge of #57833 - jethrogb:jb/thread-spawn-unwrap, r=alexcrichtonMazdak Farrokhzad-1/+1
Print a slightly clearer message when failing to launch a thread As discussed in #46345, the `io::Error` you get when a thread fails to launch is of type `io::ErrorKind::WouldBlock`. This is super uninformative when an arbitrary `thread::spawn` fails somewhere in your code: ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "operation would block" }', src/libcore/result.rs:997:5 ``` This PR improves the situation a little bit by using `expect` instead of `unwrap`. I don't consider this a complete fix for #46345 though.
2019-01-27Change generator trait to use pinningWim Looman-1/+3
2019-01-27Auto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichtonbors-16/+45
Bump bootstrap compiler to 1.33 beta r? @alexcrichton or @pietroalbini cc @rust-lang/release
2019-01-26Replace deprecated ATOMIC_INIT constsMark Rousskov-12/+45
2019-01-26Rollup merge of #57703 - m-ou-se:mutexguard-debug, r=cramertjMazdak Farrokhzad-3/+1
Make MutexGuard's Debug implementation more useful. Fixes #57702.
2019-01-26Bump bootstrap compiler to 1.33 betaMark Rousskov-4/+0
2019-01-24Rollup merge of #57867 - Aaron1011:fix/gen-future-doc, r=CentrilMazdak Farrokhzad-1/+1
Fix std::future::from_generator documentation This function takes a generator and wraps it in a future, not vice-versa.
2019-01-24Rollup merge of #57860 - jethrogb:jb/sgx-os-ffi, r=joshtriplettMazdak Farrokhzad-1/+111
Add os::fortanix_sgx::ffi module This uses the same byte slice accessors that Unix has. The [ABI specifies](https://docs.rs/fortanix-sgx-abi/0.3.2/fortanix_sgx_abi/struct.ByteBuffer.html) byte slices.