diff options
| author | bors <bors@rust-lang.org> | 2019-09-05 02:11:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-09-05 02:11:06 +0000 |
| commit | a24f636e60a5da57ab641d800ac5952bbde98b65 (patch) | |
| tree | df8c02fb78ed123bf2e2e65501a037753fe6f4fe /src/libstd | |
| parent | f257c40b199198eacc65bb31f932ee04305e6d41 (diff) | |
| parent | 51ae5d053b6125027010faff963b333d8e48c77a (diff) | |
| download | rust-a24f636e60a5da57ab641d800ac5952bbde98b65.tar.gz rust-a24f636e60a5da57ab641d800ac5952bbde98b65.zip | |
Auto merge of #64160 - Centril:rollup-vrfj1pt, r=Centril
Rollup of 15 pull requests Successful merges: - #62860 (Stabilize checked_duration_since for 1.38.0) - #63549 (Rev::rposition counts from the wrong end) - #63985 (Stabilize pin_into_inner in 1.39.0) - #64005 (Add a `Place::is_indirect` method to determine whether a `Place` contains a `Deref` projection) - #64031 (Harden `param_attrs` test wrt. usage of a proc macro `#[attr]`) - #64038 (Check impl trait substs when checking for recursive types) - #64043 (Add some more tests for underscore imports) - #64092 (Update xLTO compatibility table in rustc book.) - #64110 (Refer to "`self` type" instead of "receiver type") - #64120 (Move path parsing earlier) - #64123 (Added warning around code with reference to uninit bytes) - #64128 (unused_parens: account for or-patterns and `&(mut x)`) - #64141 (Minimize uses of `LocalInternedString`) - #64142 (Fix doc links in `std::cmp` module) - #64148 (fix a few typos in comments) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 8 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 1 | ||||
| -rw-r--r-- | src/libstd/time.rs | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 5060f368229..0386dbd490d 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -371,6 +371,14 @@ where loop { if g.len == g.buf.len() { unsafe { + // FIXME(danielhenrymantilla): #42788 + // + // - This creates a (mut) reference to a slice of + // _uninitialized_ integers, which is **undefined behavior** + // + // - Only the standard library gets to soundly "ignore" this, + // based on its privileged knowledge of unstable rustc + // internals; g.buf.reserve(reservation_size(r)); let capacity = g.buf.capacity(); g.buf.set_len(capacity); diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index c3882bacf87..71050b0dcd1 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -244,7 +244,6 @@ #![feature(cfg_target_has_atomic)] #![feature(cfg_target_thread_local)] #![feature(char_error_internals)] -#![feature(checked_duration_since)] #![feature(clamp)] #![feature(compiler_builtins_lib)] #![feature(concat_idents)] diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 98371b9ba3d..d59085cd44a 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -221,7 +221,6 @@ impl Instant { /// # Examples /// /// ```no_run - /// #![feature(checked_duration_since)] /// use std::time::{Duration, Instant}; /// use std::thread::sleep; /// @@ -231,7 +230,7 @@ impl Instant { /// println!("{:?}", new_now.checked_duration_since(now)); /// println!("{:?}", now.checked_duration_since(new_now)); // None /// ``` - #[unstable(feature = "checked_duration_since", issue = "58402")] + #[stable(feature = "checked_duration_since", since = "1.39.0")] pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration> { self.0.checked_sub_instant(&earlier.0) } @@ -242,7 +241,6 @@ impl Instant { /// # Examples /// /// ```no_run - /// #![feature(checked_duration_since)] /// use std::time::{Duration, Instant}; /// use std::thread::sleep; /// @@ -252,7 +250,7 @@ impl Instant { /// println!("{:?}", new_now.saturating_duration_since(now)); /// println!("{:?}", now.saturating_duration_since(new_now)); // 0ns /// ``` - #[unstable(feature = "checked_duration_since", issue = "58402")] + #[stable(feature = "checked_duration_since", since = "1.39.0")] pub fn saturating_duration_since(&self, earlier: Instant) -> Duration { self.checked_duration_since(earlier).unwrap_or(Duration::new(0, 0)) } |
