Rollup merge of #55839 - dralley:docstring-spelling, r=TimNN

Fix docstring spelling mistakes
This commit is contained in:
Pietro Albini 2018-11-11 00:21:24 +01:00 committed by GitHub
commit 417b10a0e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -350,9 +350,8 @@ macro_rules! try {
/// assert_eq!(v, b"s = \"abc 123\""); /// assert_eq!(v, b"s = \"abc 123\"");
/// ``` /// ```
/// ///
/// Note: This macro can be used in `no_std` setups as well /// Note: This macro can be used in `no_std` setups as well.
/// In a `no_std` setup you are responsible for the /// In a `no_std` setup you are responsible for the implementation details of the components.
/// implementation details of the components.
/// ///
/// ```no_run /// ```no_run
/// # extern crate core; /// # extern crate core;
@ -440,7 +439,7 @@ macro_rules! writeln {
/// ///
/// If the determination that the code is unreachable proves incorrect, the /// If the determination that the code is unreachable proves incorrect, the
/// program immediately terminates with a [`panic!`]. The function [`unreachable_unchecked`], /// 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. /// optimize the code out of the release version entirely.
/// ///
/// [`panic!`]: ../std/macro.panic.html /// [`panic!`]: ../std/macro.panic.html

View File

@ -3,7 +3,7 @@
//! It is sometimes useful to have objects that are guaranteed to not move, //! 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. //! 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, //! since moving an object with pointers to itself will invalidate them,
//! which could cause undefined behavior. //! which could cause undefined behavior.
//! //!
@ -39,7 +39,7 @@
//! use std::marker::Pinned; //! use std::marker::Pinned;
//! use std::ptr::NonNull; //! 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, //! // We cannot inform the compiler about that with a normal reference,
//! // since this pattern cannot be described with the usual borrowing rules. //! // 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, //! // Instead we use a raw pointer, though one which is known to not be null,