Skip to content

Commit 8b23cd4

Browse files
author
liuzhenyu
committed
fix typos
1 parent 91609c1 commit 8b23cd4

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

alloc/src/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ impl<T: ?Sized> Unpin for Rc<T> {}
21012101
///
21022102
/// - This function is safe for any argument if `T` is sized, and
21032103
/// - if `T` is unsized, the pointer must have appropriate pointer metadata
2104-
/// aquired from the real instance that you are getting this offset for.
2104+
/// acquired from the real instance that you are getting this offset for.
21052105
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
21062106
// Align the unsized value to the end of the `RcBox`.
21072107
// Because it is ?Sized, it will always be the last field in memory.

alloc/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ impl<T: ?Sized> Unpin for Arc<T> {}
22552255
///
22562256
/// - This function is safe for any argument if `T` is sized, and
22572257
/// - if `T` is unsized, the pointer must have appropriate pointer metadata
2258-
/// aquired from the real instance that you are getting this offset for.
2258+
/// acquired from the real instance that you are getting this offset for.
22592259
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
22602260
// Align the unsized value to the end of the `ArcInner`.
22612261
// Because it is `?Sized`, it will always be the last field in memory.

alloc/tests/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn box_clone_and_clone_from_equivalence() {
3737
/// This test might give a false positive in case the box realocates, but the alocator keeps the
3838
/// original pointer.
3939
///
40-
/// On the other hand it won't give a false negative, if it fails than the memory was definitly not
40+
/// On the other hand it won't give a false negative, if it fails than the memory was definitely not
4141
/// reused
4242
#[test]
4343
fn box_clone_from_ptr_stability() {

std/src/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ unsafe impl AllocRef for System {
189189
ReallocPlacement::MayMove if layout.size() == 0 => {
190190
let new_layout =
191191
// SAFETY: The new size and layout alignement guarantees
192-
// are transfered to the caller (they come from parameters).
192+
// are transferred to the caller (they come from parameters).
193193
//
194194
// See the preconditions for `Layout::from_size_align` to
195195
// see what must be checked.
@@ -254,7 +254,7 @@ unsafe impl AllocRef for System {
254254
//
255255
// See `GlobalAlloc::realloc` for more informations about the
256256
// guarantees expected by this method. `ptr`, `layout` and
257-
// `new_size` are parameters and the responsability for their
257+
// `new_size` are parameters and the responsibility for their
258258
// correctness is left to the caller.
259259
//
260260
// `realloc` probably checks for `new_size < size` or something

std/src/keyword_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ mod self_upper_keyword {}
13631363
///
13641364
/// let r1 = &FOO as *const _;
13651365
/// let r2 = &FOO as *const _;
1366-
/// // With a strictly read-only static, references will have the same adress
1366+
/// // With a strictly read-only static, references will have the same address
13671367
/// assert_eq!(r1, r2);
13681368
/// // A static item can be used just like a variable in many cases
13691369
/// println!("{:?}", FOO);

std/src/sync/once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
// see the changes to drop the `Waiter` struct correctly.
8282
// * There is one place where the two atomics `Once.state_and_queue` and
8383
// `Waiter.signaled` come together, and might be reordered by the compiler or
84-
// processor. Because both use Aquire ordering such a reordering is not
84+
// processor. Because both use Acquire ordering such a reordering is not
8585
// allowed, so no need for SeqCst.
8686

8787
use crate::cell::Cell;

0 commit comments

Comments
 (0)