diff --git a/library/std/src/io/readbuf.rs b/library/std/src/io/readbuf.rs index d84a500e07800..c655bc889308c 100644 --- a/library/std/src/io/readbuf.rs +++ b/library/std/src/io/readbuf.rs @@ -52,7 +52,7 @@ impl<'a> ReadBuf<'a> { /// Creates a new `ReadBuf` from a fully uninitialized buffer. /// - /// Use `assume_init` if part of the buffer is known to be already inintialized. + /// Use `assume_init` if part of the buffer is known to be already initialized. #[inline] pub fn uninit(buf: &'a mut [MaybeUninit]) -> ReadBuf<'a> { ReadBuf { buf, filled: 0, initialized: 0 } @@ -145,7 +145,7 @@ impl<'a> ReadBuf<'a> { byte.write(0); } - // SAFETY: we just inintialized uninit bytes, and the previous bytes were already init + // SAFETY: we just initialized uninit bytes, and the previous bytes were already init unsafe { self.assume_init(n); } diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index da95fe21ac9af..4029125a375df 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -1826,7 +1826,7 @@ impl fmt::Display for Ipv6Addr { } } } else { - // Slow path: write the address to a local buffer, the use f.pad. + // Slow path: write the address to a local buffer, then use f.pad. // Defined recursively by using the fast path to write to the // buffer. diff --git a/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs b/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs index 7843c251666c5..a795088a1d945 100644 --- a/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs +++ b/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs @@ -3,7 +3,7 @@ #![feature(rustc_attrs)] // Test to ensure that we can handle cases where -// let statements create no bindings are intialized +// let statements create no bindings are initialized // using a Place expression // // Note: Currently when feature `capture_disjoint_fields` is enabled