Skip to content

Commit e27ef13

Browse files
authored
grammar nit
1 parent 3d07108 commit e27ef13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/alloc/src/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ impl<T: ?Sized> Weak<T> {
18601860
let offset = unsafe { data_offset(ptr) };
18611861

18621862
// Reverse the offset to find the original RcBox.
1863-
// SAFETY: we use wrapping_offset here because the pointer may be dangling (iff T: Sized).
1863+
// SAFETY: we use wrapping_offset here because the pointer may be dangling (but only if T: Sized).
18641864
let ptr = unsafe {
18651865
set_data_ptr(ptr as *mut RcBox<T>, (ptr as *mut u8).wrapping_offset(-offset))
18661866
};

library/alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ impl<T: ?Sized> Weak<T> {
16431643
let offset = unsafe { data_offset(ptr) };
16441644

16451645
// Reverse the offset to find the original ArcInner.
1646-
// SAFETY: we use wrapping_offset here because the pointer may be dangling (iff T: Sized)
1646+
// SAFETY: we use wrapping_offset here because the pointer may be dangling (but only if T: Sized)
16471647
let ptr = unsafe {
16481648
set_data_ptr(ptr as *mut ArcInner<T>, (ptr as *mut u8).wrapping_offset(-offset))
16491649
};

0 commit comments

Comments
 (0)