about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-12-19Adding unwinding support for x86_64_fortanix_unknown_sgx target.Vardhan Thigle-6/+139
2018-12-19Rollup merge of #56363 - Lucretiel:patch-3, r=shepmasterPietro Albini-13/+10
Defactored Bytes::read Removed unneeded refactoring of read_one_byte, which removed the unneeded dynamic dispatch (`dyn Read`) used by that function. This function is only used in one place in the entire Rust codebase; there doesn't seem to be a reason for it to exist (and there especially doesn't seem to be a reason for it to use dynamic dispatch)
2018-12-19Revert "Remove some dead code from `sgx`"Jethro Beekman-0/+15
This reverts commit 134661917bf4b086b027a2c58219d50ba57a1453.
2018-12-19SGX target: fix docs buildJethro Beekman-2/+2
2018-12-19Show platform-specific modules in `std::os` when building those platformsJethro Beekman-17/+16
2018-12-17deny intra-doc link resolution failures in libstdAndy Russell-1/+8
2018-12-17Reordered match armsNathan West-1/+1
2018-12-17rename div_euc -> div_euclid, and mod_euc -> rem_euclidNicole Mazzuca-30/+30
logic is written up in https://github.com/rust-lang/rust/issues/49048 Also, update the documentation slightly
2018-12-17Update the stdsimd submoduleAlex Crichton-15/+15
This brings in a few updates: * Update wasm intrinsic naming for atomics * Update and reimplement most simd128 wasm intrinsics * Other misc improvements here and there, including a small start to AVX-512 intrinsics
2018-12-16Rollup merge of #56858 - tbu-:pr_doc_canonicalize, r=shepmasterMazdak Farrokhzad-1/+1
Fix doc of `std::fs::canonicalize` Point out that the final component of the path name might be a filename (and not a directory name). Previously, the doc said that all components of the path must be directory names, when it actually only ment all but the final one. Fixes #54056.
2018-12-16Rollup merge of #56857 - tbu-:pr_doc_abssub, r=zackmdavisMazdak Farrokhzad-2/+4
Fix a small mistake regarding NaNs in a deprecation message `max` on floats returns the other argument if one of them is NaN, which would be `0.0` in this case. This is unlike the C functions `fdim` and `fdimf` which return NaN if either of their arguments is NaN. https://doc.rust-lang.org/1.31.0/std/primitive.f32.html#method.max https://en.cppreference.com/w/c/numeric/math/fdim
2018-12-16Rollup merge of #56832 - alexcrichton:external-demangle, r=Mark-SimulacrumMazdak Farrokhzad-228/+13
std: Use `rustc_demangle` from crates.io No more need to duplicate the demangling routine between crates.io and the standard library, we can use the exact same one!
2018-12-16Rollup merge of #56640 - myfreeweb:patch-1, r=alexcrichtonMazdak Farrokhzad-0/+8
Add FreeBSD unsigned char platforms to std::os::raw Reference: https://www.freebsd.org/cgi/man.cgi?query=arch&apropos=0&sektion=7
2018-12-15Fix doc of `std::fs::canonicalize`Tobias Bucher-1/+1
Point out that the final component of the path name might be a filename (and not a directory name). Previously, the doc said that all components of the path must be directory names, when it actually only ment all but the final one. Fixes #54056.
2018-12-15Fix a small mistake regarding NaNs in a deprecation messageTobias Bucher-2/+4
`max` on floats returns the other argument if one of them is NaN, which would be `0.0` in this case. This is unlike the C functions `fdim` and `fdimf` which return NaN if either of their arguments is NaN. https://doc.rust-lang.org/1.31.0/std/primitive.f32.html#method.max https://en.cppreference.com/w/c/numeric/math/fdim
2018-12-15Rollup merge of #56809 - dbrgn:permissions-ext, r=alexcrichtonPietro Albini-1/+2
Fix docs path to PermissionsExt Couldn't test the link yet, since I didn't figure out how to build std rustdocs without building the entire compiler itself :slightly_smiling_face:
2018-12-15Rollup merge of #56731 - GuillaumeGomez:ffi-doc-urls, r=CentrilPietro Albini-13/+15
Add missing urls in ffi module docs r? @QuietMisdreavus
2018-12-14std: Use `rustc_demangle` from crates.ioAlex Crichton-228/+13
No more need to duplicate the demangling routine between crates.io and the standard library, we can use the exact same one!
2018-12-14Add documentation about panicking Add<Duration> implsLinus Färnstrand-0/+12
2018-12-14Use checked_add for adding time in recv_timeoutLinus Färnstrand-6/+18
2018-12-14Remove dead codeOliver Scherer-41/+0
2018-12-14Auto merge of #56818 - kennytm:rollup-2, r=kennytmbors-27/+3
Rollup of 14 pull requests (first batch) Successful merges: - #56562 (Update libc version required by rustc) - #56609 (Unconditionally emit the target-cpu LLVM attribute.) - #56637 (rustdoc: Fix local reexports of proc macros) - #56658 (Add non-panicking `maybe_new_parser_from_file` variant) - #56695 (Fix irrefutable matches on integer ranges) - #56699 (Use a `newtype_index!` within `Symbol`.) - #56702 ([self-profiler] Add column for percent of total time) - #56708 (Remove some unnecessary feature gates) - #56709 (Remove unneeded extra chars to reduce search-index size) - #56744 (specialize: remove Boxes used by Children::insert) - #56748 (Update panic message to be clearer about env-vars) - #56749 (x86: Add the `adx` target feature to whitelist) - #56756 (Disable btree pretty-printers on older gdbs) - #56789 (rustc: Add an unstable `simd_select_bitmask` intrinsic) r? @ghost
2018-12-14Rollup merge of #56748 - kinnison:kinnison/fix-56734, r=dtolnaykennytm-1/+2
Update panic message to be clearer about env-vars Esteban Kuber requested that the panic message make it clear that `RUST_BACKTRACE=1` is an environment variable. This change makes that clear. I understand that this may simply be closed if the concept isn't accepted, and I'd be fine with that :-) Fixes #56734
2018-12-14Rollup merge of #56708 - oli-obk:stability_internal_const_fn, r=alexcrichtonkennytm-26/+1
Remove some unnecessary feature gates fixes #56585 cc @jethrogb
2018-12-14Auto merge of #56568 - notriddle:master, r=alexcrichtonbors-53/+209
Remove dependency on shell32.dll Closes #56510 if it works on MinGW (I've only tested it on MSVC).
2018-12-14Fix docs path to PermissionsExtDanilo Bargen-1/+2
2018-12-14Auto merge of #56490 - faern:add-checked-add-to-instant, r=alexcrichtonbors-166/+150
Add checked_add method to Instant time type Appending functionality to the already opened topic of `checked_add` on time types over at #55940. Doing checked addition between an `Instant` and a `Duration` is important to reliably determine a future instant. We could use this in the `parking_lot` crate to compute an instant when in the future to wake a thread up without risking a panic.
2018-12-14Auto merge of #56536 - alexcrichton:update-master, r=Mark-Simulacrumbors-8/+5
Bump to 1.33.0 * Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations
2018-12-13Update panic message to be clearer about env-varsDaniel Silverstone-1/+2
Esteban Kuber requested that the panic message make it clear that `RUST_BACKTRACE=1` is an environment variable. This change makes that clear. Wording provided in part by David Tolnay.
2018-12-13Fix dur2intervals import on cloudabiLinus Färnstrand-5/+9
2018-12-13Fix checked_add/sub for sys/sgx/time.rsLinus Färnstrand-11/+7
2018-12-13Add checked_sub for Instant and SystemTimeLinus Färnstrand-87/+83
2018-12-13Add checked_add method to Instant time typeLinus Färnstrand-74/+62
2018-12-12use actual invalid string in OsStr::to_string_lossy exampleLyndon Brown-8/+33
2018-12-12Bump to 1.33.0Alex Crichton-8/+5
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-9/+14
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-11Add missing urls in ffi module docsGuillaume Gomez-13/+15
2018-12-11Use iterators instead of raw offsets in Windows argument parserMichael Howell-49/+45
2018-12-11Address unused variables warning with TcpStreamvarkor-0/+3
2018-12-11Properly stage new feature gatesOliver Scherer-1/+1
2018-12-11Remove some dead code from `sgx`Oliver Scherer-15/+0
2018-12-11Remove unnecessary feature gates from const fnsOliver Scherer-11/+1
2018-12-10Fix iterator nitsMichael Howell-18/+7
2018-12-10Fix nitMichael Howell-4/+6
Rewrite it to not use `if let`.
2018-12-10Fix nitsMichael Howell-3/+10
Add comments explaining how we test this, and use a slice for debugging instead of a clone of the iterator.
2018-12-10Update Cargo submodule and its dependenciesAlex Crichton-4/+3
Hopefully just another routine update! So far this starts to enable the `std::arch` in stage0 builds of rustc. This means that we may need stage0/not(stage0) in stdsimd itself, but more and more code is starting to use `std::arch` so I think it's time to start shifting the balance of work here.
2018-12-10Fix poorly-transcribed test caseMichael Howell-3/+3
2018-12-10Fix nitpicksMichael Howell-23/+21
Switch to vec::IntoIter as our backing double-ended iterator. Fix incorrect comment.
2018-12-10Remove dependency on shell32.dll #56510Michael Howell-42/+206
2018-12-10Auto merge of #56157 - RalfJung:park, r=nagisabors-5/+22
expand thread::park explanation Cc @carllerche @parched @stjepang