Skip to content

Commit 38d2f9b

Browse files
committed
Fix docstring spelling mistakes
1 parent 36a50c2 commit 38d2f9b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/libcore/macros.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,8 @@ macro_rules! try {
350350
/// assert_eq!(v, b"s = \"abc 123\"");
351351
/// ```
352352
///
353-
/// Note: This macro can be used in `no_std` setups as well
354-
/// In a `no_std` setup you are responsible for the
355-
/// implementation details of the components.
353+
/// Note: This macro can be used in `no_std` setups as well.
354+
/// In a `no_std` setup you are responsible for the implementation details of the components.
356355
///
357356
/// ```no_run
358357
/// # extern crate core;
@@ -440,7 +439,7 @@ macro_rules! writeln {
440439
///
441440
/// If the determination that the code is unreachable proves incorrect, the
442441
/// program immediately terminates with a [`panic!`]. The function [`unreachable_unchecked`],
443-
/// which belongs to the [`std::hint`] module, informs the compilier to
442+
/// which belongs to the [`std::hint`] module, informs the compiler to
444443
/// optimize the code out of the release version entirely.
445444
///
446445
/// [`panic!`]: ../std/macro.panic.html

src/libcore/pin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! It is sometimes useful to have objects that are guaranteed to not move,
44
//! in the sense that their placement in memory does not change, and can thus be relied upon.
55
//!
6-
//! A prime example of such a scenario would be building self-referencial structs,
6+
//! A prime example of such a scenario would be building self-referential structs,
77
//! since moving an object with pointers to itself will invalidate them,
88
//! which could cause undefined behavior.
99
//!
@@ -39,7 +39,7 @@
3939
//! use std::marker::Pinned;
4040
//! use std::ptr::NonNull;
4141
//!
42-
//! // This is a self referencial struct since the slice field points to the data field.
42+
//! // This is a self-referential struct since the slice field points to the data field.
4343
//! // We cannot inform the compiler about that with a normal reference,
4444
//! // since this pattern cannot be described with the usual borrowing rules.
4545
//! // Instead we use a raw pointer, though one which is known to not be null,

0 commit comments

Comments
 (0)