diff options
| author | bors <bors@rust-lang.org> | 2020-07-07 00:56:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-07-07 00:56:44 +0000 |
| commit | 70f9d23b916f2db7da711aa4a0317a218997ba42 (patch) | |
| tree | 583d0a11c2b82dc7ebc149ebbcdab4523dedbdfe /src/libstd | |
| parent | 8981dbbc36f1575b0a417b6849767bde29e7c6b4 (diff) | |
| parent | 73f2069d529c9d945967dd8f1a3b71b6003c7f96 (diff) | |
| download | rust-70f9d23b916f2db7da711aa4a0317a218997ba42.tar.gz rust-70f9d23b916f2db7da711aa4a0317a218997ba42.zip | |
Auto merge of #74117 - Manishearth:rollup-ds7z0kx, r=Manishearth
Rollup of 14 pull requests Successful merges: - #70563 ([rustdoc] Page hash handling) - #73856 (Edit librustc_lexer top-level docs) - #73870 (typeck: adding type information to projection) - #73953 (Audit hidden/short code suggestions) - #73962 (libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)]) - #73969 (mir: mark mir construction temporaries as internal) - #73974 (Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr)) - #74067 (rustdoc: Restore underline text decoration on hover for FQN in header) - #74074 (Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.) - #74078 (Always resolve type@primitive as a primitive, not a module) - #74089 (Add rust-analyzer to the build manifest) - #74090 (Remove unused RUSTC_DEBUG_ASSERTIONS) - #74102 (Fix const prop ICE) - #74112 (Expand abbreviation in core::ffi description) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/net/tcp.rs | 7 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/vxworks/ext/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/ext/fs.rs | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 9ac54dd5f7a..47b8532b7a6 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -1,3 +1,4 @@ +#![deny(unsafe_op_in_unsafe_fn)] use crate::io::prelude::*; use crate::fmt; @@ -583,7 +584,8 @@ impl Read for TcpStream { #[inline] unsafe fn initializer(&self) -> Initializer { - Initializer::nop() + // SAFETY: Read is guaranteed to work on uninitialized memory + unsafe { Initializer::nop() } } } #[stable(feature = "rust1", since = "1.0.0")] @@ -622,7 +624,8 @@ impl Read for &TcpStream { #[inline] unsafe fn initializer(&self) -> Initializer { - Initializer::nop() + // SAFETY: Read is guaranteed to work on uninitialized memory + unsafe { Initializer::nop() } } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index e4d71493604..2b2bbc6e9d6 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -133,7 +133,7 @@ pub trait FileExt { /// Note that similar to [`File::write`], it is not an error to return a /// short write. /// - /// [`File::write`]: ../../../../std/fs/struct.File.html#write.v + /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write /// /// # Examples /// diff --git a/src/libstd/sys/vxworks/ext/fs.rs b/src/libstd/sys/vxworks/ext/fs.rs index 7cc64658ee1..b479fbaf346 100644 --- a/src/libstd/sys/vxworks/ext/fs.rs +++ b/src/libstd/sys/vxworks/ext/fs.rs @@ -132,7 +132,7 @@ pub trait FileExt { /// Note that similar to [`File::write`], it is not an error to return a /// short write. /// - /// [`File::write`]: ../../../../std/fs/struct.File.html#write.v + /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write /// /// # Examples /// diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs index f85120d170f..81b2bf99872 100644 --- a/src/libstd/sys/windows/ext/fs.rs +++ b/src/libstd/sys/windows/ext/fs.rs @@ -259,7 +259,7 @@ pub trait OpenOptionsExt { /// [Impersonation Levels]: /// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level #[stable(feature = "open_options_ext", since = "1.10.0")] - fn security_qos_flags(&mut self, flags: u32) -> &mut OpenOptions; + fn security_qos_flags(&mut self, flags: u32) -> &mut Self; } #[stable(feature = "open_options_ext", since = "1.10.0")] |
