summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-01-08Auto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkorbors-0/+1
check missing docs for reexported macros as well Fixes #56334.
2019-01-08Supporting backtrace for x86_64-fortanix-unknown-sgx.Vardhan Thigle-10/+83
2019-01-08Auto merge of #56988 - alexcrichton:monotonic-instant, r=sfacklerbors-13/+101
std: Force `Instant::now()` to be monotonic This commit is an attempt to force `Instant::now` to be monotonic through any means possible. We tried relying on OS/hardware/clock implementations, but those seem buggy enough that we can't rely on them in practice. This commit implements the same hammer Firefox recently implemented (noted in #56612) which is to just keep whatever the lastest `Instant::now()` return value was in memory, returning that instead of the OS looks like it's moving backwards. Closes #48514 Closes #49281 cc #51648 cc #56560 Closes #56612 Closes #56940
2019-01-07std: Force `Instant::now()` to be monotonicAlex Crichton-13/+101
This commit is an attempt to force `Instant::now` to be monotonic through any means possible. We tried relying on OS/hardware/clock implementations, but those seem buggy enough that we can't rely on them in practice. This commit implements the same hammer Firefox recently implemented (noted in #56612) which is to just keep whatever the lastest `Instant::now()` return value was in memory, returning that instead of the OS looks like it's moving backwards. Closes #48514 Closes #49281 cc #51648 cc #56560 Closes #56612 Closes #56940
2019-01-07Use correct tracking issue for c_variadicRyan Hunt-1/+1
Fixes #57306
2019-01-07Rollup merge of #57375 - stjepang:duration-constants, r=joshtriplettPietro Albini-0/+4
Add duration constants Add constants `SECOND`, `MILLISECOND`, `MICROSECOND`, and `NANOSECOND` to `core::time`. This will make working with durations more ergonomic. Compare: ```rust // Convenient, but deprecated function. thread::sleep_ms(2000); // The current canonical way to sleep for two seconds. thread::sleep(Duration::from_secs(2)); // Sleeping using one of the new constants. thread::sleep(2 * SECOND); ```
2019-01-07Specify the tracking issueStjepan Glavina-1/+1
2019-01-06check missing docs for reexported macros as wellGuillaume Gomez-0/+1
2019-01-06Re-export constants from core into stdStjepan Glavina-0/+4
2019-01-05Rollup merge of #57326 - king6cong:doc, r=rkruppekennytm-2/+2
Doc rewording, use the same name `writer` None
2019-01-05Rollup merge of #57314 - wiktorkuchta:master, r=Centrilkennytm-3/+3
Fix repeated word typos Inspired by #57295 (I skipped 'be be' because of it) and my [PR in another repo ](https://github.com/e-maxx-eng/e-maxx-eng/pull/389) Not a stupid `sed`, I actually tried to fix case by case.
2019-01-05Rollup merge of #57312 - Mendess2526:master, r=Centrilkennytm-2/+2
`const fn` is no longer coming soon (const keyword docs) The `const` keyword [documentation](https://doc.rust-lang.org/std/keyword.const.html) mentions that `const fn`s are coming soon, but they have already been added.
2019-01-05Rollup merge of #57249 - frewsxcv:frewsxcv-second-edition, r=KodrAuskennytm-5/+5
Fix broken links to second edition TRPL. Fixes https://github.com/rust-lang/rust/issues/57104. Remove `second-edition/` from TRPL hyperlinks.
2019-01-05Rollup merge of #57238 - Zoxc:bt-fix, r=alexcrichtonkennytm-1/+10
Fix backtraces for inlined functions on Windows Fixes an regression introduced in https://github.com/rust-lang/rust/pull/50526 r? @alexcrichton
2019-01-04Doc rewording, use the same name `writer`king6cong-2/+2
2019-01-03Fix repeated word typosWiktor Kuchta-3/+3
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2019-01-03const fn no longer comming soon on const docsMendess2526-2/+2
2019-01-03Fixed the link to the ? operatorJoseph Lyons-1/+1
2019-01-02Auto merge of #57243 - dingelish:master, r=sfacklerbors-9/+13
Bound sgx target_env with fortanix as target_vendor This PR adds `target_vendor` check, as discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231) Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-02Auto merge of #56827 - faern:eliminate-recv-timeout-panic, r=KodrAusbors-6/+30
Eliminate Receiver::recv_timeout panic Fixes #54552. This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method. Very recently we merged (still unstable) support for checked addition (#56490) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.
2019-01-01Merge remote-tracking branch 'upstream/master'Yu Ding-40/+0
2019-01-01Remove min_const_unsafe_fn since it is stableYu Ding-2/+1
Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-5/+5
Fixes https://github.com/rust-lang/rust/issues/57104.
2019-01-01Auto merge of #57194 - matthiaskrgr:copyright_headers, r=Centrilbors-30/+0
remove more copyright headers r? @Mark-Simulacrum
2018-12-31Bound sgx target_env with fortanix as target_vendorYu Ding-9/+14
Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-01privacy: Use common `DefId` visiting infra for all privacy visitorsVadim Petrochenkov-10/+0
2018-12-31Fix backtraces on WindowsJohn Kåre Alsaker-1/+10
2018-12-31const-stabilize Ipv4Addr::newMazdak Farrokhzad-2/+2
2018-12-31const-stabilize const_int_ops + reverse_bitsMazdak Farrokhzad-1/+1
2018-12-29Rollup merge of #57177 - varkor:fix-duration_as_u128-warning, r=estebankkennytm-1/+0
Fix warning when compiling rustc
2018-12-29Rollup merge of #57153 - estebank:doc, r=cramertjkennytm-1/+1
Small: Fix span in char documentation
2018-12-28Update std/lib.rs docs to reflect Rust 2018 usageJacob Kiesel-4/+2
2018-12-28remove remaining copyright headersMatthias Krüger-30/+0
2018-12-28Fix warning when compiling rustcvarkor-1/+0
2018-12-28Auto merge of #57137 - cramertj:unpin-prelude, r=SimonSapinbors-1/+1
Add Unpin to std prelude, not just core r? @alexcrichton
2018-12-28Auto merge of #55519 - fhartwig:hashmap-index-example, r=Centrilbors-0/+3
Add example of using the indexing operator to HashMap docs Fixes #52575
2018-12-27Fix span in char documentationEsteban Küber-1/+1
2018-12-27Auto merge of #57119 - jethrogb:jb/sgx-os-mod2, r=joshtriplettbors-11/+307
Add `io` and `arch` modules to `std::os::fortanix_sgx` This PR adds two more (unstable) modules to `std::os::fortanix_sgx` for the `x86_64-fortanix-unknown-sgx` target. ### io `io` allows conversion between raw file descriptors and Rust types, similar to `std::os::unix::io`. ### arch `arch` exposes the `ENCLU[EREPORT]` and `ENCLU[EGETKEY]` instructions. The current functions are very likely not going to be the final form of these functions (see also https://github.com/fortanix/rust-sgx/issues/15), but this should be sufficient to enable experimentation in libraries. I tried using the actual types (from the [`sgx-isa` crate](https://crates.io/crates/sgx-isa)) instead of byte arrays, but that would make `std` dependent on the `bitflags` crate which I didn't want to do at this time.
2018-12-26Add Unpin to std prelude, not just coreTaylor Cramer-1/+1
2018-12-26Stabilize duration_as_u128Sunjay Varma-1/+1
2018-12-25Remove licensesMark Rousskov-3435/+0
2018-12-25Add `io` and `arch` modules to `std::os::fortanix_sgx`Jethro Beekman-10/+305
2018-12-25Fix build on latest git masterJethro Beekman-1/+2
2018-12-25Auto merge of #56926 - alexcrichton:update-stdsimd, r=TimNNbors-15/+15
Update the stdsimd submodule 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-24std: Use backtrace-sys from crates.ioAlex Crichton-129/+34
This commit switches the standard library to using the `backtrace-sys` crate from crates.io instead of duplicating the logic here in the Rust repositor with the `backtrace-sys`'s crate's logic. Eventually this will hopefully be a good step towards using the `backtrace` crate directly from crates.io itself, but we're not quite there yet! Hopefully this is a small incremental first step we can take.
2018-12-24Rollup merge of #56978 - jethrogb:jb/sgx-os-mod, r=joshtriplettMazdak Farrokhzad-74/+357
Add `std::os::fortanix_sgx` module This PR adds the `std::os::sgx` module to expose platform-specific APIs behind the `sgx_platform` feature gate. Depends on https://github.com/rust-lang/rust/pull/56972 to be able to meaningfully build `std::os` documentation for non-standard targets. Tracking issue: https://github.com/rust-lang/rust/issues/56975
2018-12-23Rollup merge of #57067 - Centril:stabilize-min_const_unsafe_fn, r=oli-obkMazdak Farrokhzad-1/+0
Stabilize min_const_unsafe_fn in 1.33 Fixes #55607 r? @oli-obk
2018-12-23Rollup merge of #56939 - cramertj:pin-stabilization, r=alexcrichtonMazdak Farrokhzad-3/+2
Pin stabilization This implements the changes suggested in https://github.com/rust-lang/rust/issues/55766#issue-378417538 and stabilizes the `pin` feature. @alexcrichton also listed several "blockers" in that issue, but then in [this comment](https://github.com/rust-lang/rust/issues/55766#issuecomment-445074980) mentioned that they're more "TODO items": > In that vein I think it's fine for a stabilization PR to be posted at any time now with FCP lapsed for a week or so now. The final points about self/pin/pinned can be briefly discussed there (if even necessary, they could be left as the proposal above). Let's settle these last bits here and get this thing stabilized! :) r? @alexcrichton cc @withoutboats
2018-12-23stabilize min_const_unsafe_fn in 1.33.Mazdak Farrokhzad-1/+0
2018-12-23Rollup merge of #57050 - RyanMarcus:master, r=zackmdaviskennytm-1/+1
Fixed typo in HashMap documentation Previously "with a custom type as key", now "with a custom key type"