about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorDaniPopes <57450786+DaniPopes@users.noreply.github.com>2023-04-10 21:07:29 +0200
committerDaniPopes <57450786+DaniPopes@users.noreply.github.com>2023-04-10 21:07:29 +0200
commita0daf22b95ff1cd3f7ac55ea9370987535f3134d (patch)
treef8efc443c71e799ab49867ffbc3721a497b7c982 /library/core/src
parenta73288371e3fa0a610fbc11e7e8418017bdfde42 (diff)
downloadrust-a0daf22b95ff1cd3f7ac55ea9370987535f3134d.tar.gz
rust-a0daf22b95ff1cd3f7ac55ea9370987535f3134d.zip
Fix typos in library
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/intrinsics/mir.rs2
-rw-r--r--library/core/src/slice/sort.rs2
-rw-r--r--library/core/src/str/pattern.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/intrinsics/mir.rs b/library/core/src/intrinsics/mir.rs
index 6690c1a76d5..3f6c445af7b 100644
--- a/library/core/src/intrinsics/mir.rs
+++ b/library/core/src/intrinsics/mir.rs
@@ -246,7 +246,7 @@
 //!     - The exception is the last arm, which must be `_ => basic_block` and corresponds to the
 //!       otherwise branch.
 //!  - [`Call`] has an associated function as well. The third argument of this function is a normal
-//!    function call expresion, for example `my_other_function(a, 5)`.
+//!    function call expression, for example `my_other_function(a, 5)`.
 //!
 
 #![unstable(
diff --git a/library/core/src/slice/sort.rs b/library/core/src/slice/sort.rs
index 2333f60a888..07fd96f9295 100644
--- a/library/core/src/slice/sort.rs
+++ b/library/core/src/slice/sort.rs
@@ -1486,7 +1486,7 @@ where
 }
 
 /// Finds a streak of presorted elements starting at the beginning of the slice. Returns the first
-/// value that is not part of said streak, and a bool denoting wether the streak was reversed.
+/// value that is not part of said streak, and a bool denoting whether the streak was reversed.
 /// Streaks can be increasing or decreasing.
 fn find_streak<T, F>(v: &[T], is_less: &mut F) -> (usize, bool)
 where
diff --git a/library/core/src/str/pattern.rs b/library/core/src/str/pattern.rs
index 19da6d2fbec..e3a464a1c51 100644
--- a/library/core/src/str/pattern.rs
+++ b/library/core/src/str/pattern.rs
@@ -1891,7 +1891,7 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
 
     // SAFETY: Via the conditional above, we know that both `px` and `py`
     // have the same length, so `px < pxend` implies that `py < pyend`.
-    // Thus, derefencing both `px` and `py` in the loop below is safe.
+    // Thus, dereferencing both `px` and `py` in the loop below is safe.
     //
     // Moreover, we set `pxend` and `pyend` to be 4 bytes before the actual
     // end of `px` and `py`. Thus, the final dereference outside of the