about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-11-11 00:21:24 +0100
committerGitHub <noreply@github.com>2018-11-11 00:21:24 +0100
commit417b10a0e3dd1ee8f677007763f830f34d320644 (patch)
treed7472a2583667a2c5ed1119ccd0865512e661b22
parent0f1c1eb48071d4ea02429ae5136444755b299fb7 (diff)
parent38d2f9b470f26ab282322f35c1494cfd37ab9354 (diff)
downloadrust-417b10a0e3dd1ee8f677007763f830f34d320644.tar.gz
rust-417b10a0e3dd1ee8f677007763f830f34d320644.zip
Rollup merge of #55839 - dralley:docstring-spelling, r=TimNN
Fix docstring spelling mistakes
-rw-r--r--src/libcore/macros.rs7
-rw-r--r--src/libcore/pin.rs4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index a0c87f13e5d..c008b78e450 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -350,9 +350,8 @@ macro_rules! try {
 /// assert_eq!(v, b"s = \"abc 123\"");
 /// ```
 ///
-/// Note: This macro can be used in `no_std` setups as well
-/// In a `no_std` setup you are responsible for the
-/// implementation details of the components.
+/// Note: This macro can be used in `no_std` setups as well.
+/// In a `no_std` setup you are responsible for the implementation details of the components.
 ///
 /// ```no_run
 /// # extern crate core;
@@ -440,7 +439,7 @@ macro_rules! writeln {
 ///
 /// If the determination that the code is unreachable proves incorrect, the
 /// program immediately terminates with a [`panic!`].  The function [`unreachable_unchecked`],
-/// which belongs to the [`std::hint`] module, informs the compilier to
+/// which belongs to the [`std::hint`] module, informs the compiler to
 /// optimize the code out of the release version entirely.
 ///
 /// [`panic!`]:  ../std/macro.panic.html
diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs
index 68de82d2945..308dd9c79fa 100644
--- a/src/libcore/pin.rs
+++ b/src/libcore/pin.rs
@@ -3,7 +3,7 @@
 //! It is sometimes useful to have objects that are guaranteed to not move,
 //! in the sense that their placement in memory does not change, and can thus be relied upon.
 //!
-//! A prime example of such a scenario would be building self-referencial structs,
+//! A prime example of such a scenario would be building self-referential structs,
 //! since moving an object with pointers to itself will invalidate them,
 //! which could cause undefined behavior.
 //!
@@ -39,7 +39,7 @@
 //! use std::marker::Pinned;
 //! use std::ptr::NonNull;
 //!
-//! // This is a self referencial struct since the slice field points to the data field.
+//! // This is a self-referential struct since the slice field points to the data field.
 //! // We cannot inform the compiler about that with a normal reference,
 //! // since this pattern cannot be described with the usual borrowing rules.
 //! // Instead we use a raw pointer, though one which is known to not be null,