diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-27 21:42:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-27 21:42:30 +0100 |
| commit | eab81297f756135d1d7bc9c34b7a7f53003f0bee (patch) | |
| tree | dc87d7d7ab36997c9e06489820ae0babda696b09 | |
| parent | 052eab54eccbd116c7cdfc631136bbc5a2bb0426 (diff) | |
| parent | 7a3a668bc92eef153973dca63b38f8d620d461b9 (diff) | |
Rollup merge of #92307 - hiroshi-maybe:fix-minor-typos, r=camelid
Fix minor typos
| -rw-r--r-- | library/std/src/io/readbuf.rs | 4 | ||||
| -rw-r--r-- | library/std/src/net/ip.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/closures/2229_closure_analysis/wild_patterns.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/io/readbuf.rs b/library/std/src/io/readbuf.rs index d84a500e078..c655bc88930 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<u8>]) -> 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 da95fe21ac9..4029125a375 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 7843c251666..a795088a1d9 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 |
