Skip to content

Commit 6830052

Browse files
committed
Auto merge of rust-lang#86637 - ehuss:spellings, r=dtolnay
Fix a few misspellings.
2 parents bca6d9b + 6235e6f commit 6830052

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3249,7 +3249,7 @@ declare_lint! {
32493249
///
32503250
/// In Rust 2021, one of the important introductions is the [prelude changes], which add
32513251
/// `TryFrom`, `TryInto`, and `FromIterator` into the standard library's prelude. Since this
3252-
/// results in an amiguity as to which method/function to call when an existing `try_into`
3252+
/// results in an ambiguity as to which method/function to call when an existing `try_into`
32533253
/// method is called via dot-call syntax or a `try_from`/`from_iter` associated function
32543254
/// is called directly on a type.
32553255
///

library/alloc/src/collections/btree/fix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use super::node::{marker, ForceResult::*, Handle, LeftOrRight::*, NodeRef, Root}
33

44
impl<'a, K: 'a, V: 'a> NodeRef<marker::Mut<'a>, K, V, marker::LeafOrInternal> {
55
/// Stocks up a possibly underfull node by merging with or stealing from a
6-
/// sibling. If succesful but at the cost of shrinking the parent node,
6+
/// sibling. If successful but at the cost of shrinking the parent node,
77
/// returns that shrunk parent node. Returns an `Err` if the node is
88
/// an empty root.
99
fn fix_node_through_parent(

library/alloc/src/collections/btree/node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ type BoxedNode<K, V> = NonNull<LeafNode<K, V>>;
167167
/// carry a lifetime, because we want it to return `&'a` references.
168168
/// Therefore, we define it only for the least powerful type `Immut<'a>`.
169169
/// - We cannot get implicit coercion from say `Mut<'a>` to `Immut<'a>`.
170-
/// Therefore, we have to explicitly call `reborrow` on a more powerfull
170+
/// Therefore, we have to explicitly call `reborrow` on a more powerful
171171
/// `NodeRef` in order to reach a method like `into_kv`.
172172
///
173173
/// All methods on `NodeRef` that return some kind of reference, either:

library/core/src/cmp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use self::Ordering::*;
4141
///
4242
/// If [`PartialOrd`] or [`Ord`] are also implemented for `Self` and `Rhs`, their methods must also
4343
/// be consistent with `PartialEq` (see the documentation of those traits for the exact
44-
/// requirememts). It's easy to accidentally make them disagree by deriving some of the traits and
44+
/// requirements). It's easy to accidentally make them disagree by deriving some of the traits and
4545
/// manually implementing others.
4646
///
4747
/// The equality relation `==` must satisfy the following conditions

library/core/src/iter/adapters/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub use self::zip::TrustedRandomAccess;
5454
#[unstable(feature = "iter_zip", issue = "83574")]
5555
pub use self::zip::zip;
5656

57-
/// This trait provides transitive access to source-stage in an interator-adapter pipeline
57+
/// This trait provides transitive access to source-stage in an iterator-adapter pipeline
5858
/// under the conditions that
5959
/// * the iterator source `S` itself implements `SourceIter<Source = S>`
6060
/// * there is a delegating implementation of this trait for each adapter in the pipeline between

library/core/src/mem/maybe_uninit.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ impl<T> MaybeUninit<T> {
980980
this.as_mut_ptr() as *mut T
981981
}
982982

983-
/// Copies the elements from `src` to `this`, returning a mutable reference to the now initalized contents of `this`.
983+
/// Copies the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`.
984984
///
985985
/// If `T` does not implement `Copy`, use [`write_slice_cloned`]
986986
///
@@ -1033,12 +1033,12 @@ impl<T> MaybeUninit<T> {
10331033

10341034
this.copy_from_slice(uninit_src);
10351035

1036-
// SAFETY: Valid elements have just been copied into `this` so it is initalized
1036+
// SAFETY: Valid elements have just been copied into `this` so it is initialized
10371037
unsafe { MaybeUninit::slice_assume_init_mut(this) }
10381038
}
10391039

1040-
/// Clones the elements from `src` to `this`, returning a mutable reference to the now initalized contents of `this`.
1041-
/// Any already initalized elements will not be dropped.
1040+
/// Clones the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`.
1041+
/// Any already initialized elements will not be dropped.
10421042
///
10431043
/// If `T` implements `Copy`, use [`write_slice`]
10441044
///
@@ -1124,7 +1124,7 @@ impl<T> MaybeUninit<T> {
11241124

11251125
super::forget(guard);
11261126

1127-
// SAFETY: Valid elements have just been written into `this` so it is initalized
1127+
// SAFETY: Valid elements have just been written into `this` so it is initialized
11281128
unsafe { MaybeUninit::slice_assume_init_mut(this) }
11291129
}
11301130
}

library/core/src/ptr/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub const fn metadata<T: ?Sized>(ptr: *const T) -> <T as Pointee>::Metadata {
101101
///
102102
/// This function is safe but the returned pointer is not necessarily safe to dereference.
103103
/// For slices, see the documentation of [`slice::from_raw_parts`] for safety requirements.
104-
/// For trait objects, the metadata must come from a pointer to the same underlying ereased type.
104+
/// For trait objects, the metadata must come from a pointer to the same underlying erased type.
105105
///
106106
/// [`slice::from_raw_parts`]: crate::slice::from_raw_parts
107107
#[unstable(feature = "ptr_metadata", issue = "81513")]

library/proc_macro/src/bridge/rpc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<S> DecodeMut<'_, '_, S> for String {
246246
}
247247
}
248248

249-
/// Simplied version of panic payloads, ignoring
249+
/// Simplified version of panic payloads, ignoring
250250
/// types other than `&'static str` and `String`.
251251
pub enum PanicMessage {
252252
StaticStr(&'static str),

library/std/src/keyword_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ mod match_keyword {}
971971
/// ```
972972
///
973973
/// Like [`struct`]s and [`enum`]s, a module and its content are private by
974-
/// default, unaccessible to code outside of the module.
974+
/// default, inaccessible to code outside of the module.
975975
///
976976
/// To learn more about allowing access, see the documentation for the [`pub`]
977977
/// keyword.

library/std/src/os/unix/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ pub trait ExitStatusExt: Sealed {
226226
///
227227
/// Panics on an attempt to make an `ExitStatusError` from a wait status of `0`.
228228
///
229-
/// Making an `ExitStatus` always succeds and never panics.
229+
/// Making an `ExitStatus` always succeeds and never panics.
230230
#[stable(feature = "exit_status_from", since = "1.12.0")]
231231
fn from_raw(raw: i32) -> Self;
232232

library/std/src/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ impl ExitStatusError {
15681568

15691569
/// Reports the exit code, if applicable, from an `ExitStatusError`, as a `NonZero`
15701570
///
1571-
/// This is exaclty like [`code()`](Self::code), except that it returns a `NonZeroI32`.
1571+
/// This is exactly like [`code()`](Self::code), except that it returns a `NonZeroI32`.
15721572
///
15731573
/// Plain `code`, returning a plain integer, is provided because is is often more convenient.
15741574
/// The returned value from `code()` is indeed also nonzero; use `code_nonzero()` when you want

library/std/src/sys/hermit/mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::sys::hermit::abi;
1414
/// This structure behaves a lot like a common mutex. There are some differences:
1515
///
1616
/// - By using busy waiting, it can be used outside the runtime.
17-
/// - It is a so called ticket lock and is completly fair.
17+
/// - It is a so called ticket lock and is completely fair.
1818
#[cfg_attr(target_arch = "x86_64", repr(align(128)))]
1919
#[cfg_attr(not(target_arch = "x86_64"), repr(align(64)))]
2020
struct Spinlock<T: ?Sized> {

0 commit comments

Comments
 (0)