about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorPoliorcetics <poliorcetics@users.noreply.github.com>2020-06-17 03:30:41 +0200
committerGitHub <noreply@github.com>2020-06-17 03:30:41 +0200
commite75fa896ba53eb5fc5c3dd2741101f377488c2db (patch)
tree53ec8623410657a9af71f2a818aaae8813c0f1e1 /src/libcore
parent15cd51af5e193789e82024ffbe194f4c0dbdfbc3 (diff)
downloadrust-e75fa896ba53eb5fc5c3dd2741101f377488c2db.tar.gz
rust-e75fa896ba53eb5fc5c3dd2741101f377488c2db.zip
Don't imply function pointers are references
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/mem/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs
index 226454561f6..70083ffa4be 100644
--- a/src/libcore/mem/mod.rs
+++ b/src/libcore/mem/mod.rs
@@ -583,7 +583,7 @@ pub const fn needs_drop<T>() -> bool {
 ///
 /// There is no guarantee that an all-zero byte-pattern represents a valid value
 /// of some type `T`. For example, the all-zero byte-pattern is not a valid value
-/// for reference types (`&T`, `&mut T` and functions pointers). Using `zeroed` on
+/// for reference types (`&T`, `&mut T`) and functions pointers. Using `zeroed` on
 /// such types on such types causes immediate [undefined behavior][ub] because
 /// [the Rust compiler assumes][inv] that there always is a valid value in a
 /// variable it considers initialized.
@@ -613,7 +613,7 @@ pub const fn needs_drop<T>() -> bool {
 /// use std::mem;
 ///
 /// let _x: &i32 = unsafe { mem::zeroed() }; // Undefined behavior!
-/// let _y: fn() = unsafe { mem::zeroed() }; // And again !
+/// let _y: fn() = unsafe { mem::zeroed() }; // And again!
 /// ```
 #[inline(always)]
 #[stable(feature = "rust1", since = "1.0.0")]