From c14e919f1e221dd0629bd88db6db77c52e03604e Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Wed, 13 Jan 2021 17:21:23 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ralf Jung --- library/alloc/src/rc.rs | 2 +- library/alloc/src/sync.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 43affa396c9d7..3ca10480b34c8 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -1881,7 +1881,7 @@ impl Weak { if is_dangling(ptr) { // If the pointer is dangling, we return the sentinel directly. This cannot be - // a valid payload address, as it is at least as aligned as RcBox (usize). + // a valid payload address, as the payload is at least as aligned as RcBox (usize). ptr as *const T } else { // SAFETY: if is_dangling returns false, then the pointer is dereferencable. diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 8917e2d4b400a..306c0c91e4b25 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1666,7 +1666,7 @@ impl Weak { if is_dangling(ptr) { // If the pointer is dangling, we return the sentinel directly. This cannot be - // a valid payload address, as it is at least as aligned as ArcInner (usize). + // a valid payload address, as the payload is at least as aligned as ArcInner (usize). ptr as *const T } else { // SAFETY: if is_dangling returns false, then the pointer is dereferencable.