about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristopher Durham <cad97@cad97.com>2021-01-13 17:21:23 -0500
committerGitHub <noreply@github.com>2021-01-13 17:21:23 -0500
commitc14e919f1e221dd0629bd88db6db77c52e03604e (patch)
treee705148d776331f86f1be7613c63f7bb85f1ebee
parentb5b6760c03867e2b16862324b4764cf35be8a1cd (diff)
downloadrust-c14e919f1e221dd0629bd88db6db77c52e03604e.tar.gz
rust-c14e919f1e221dd0629bd88db6db77c52e03604e.zip
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
-rw-r--r--library/alloc/src/rc.rs2
-rw-r--r--library/alloc/src/sync.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs
index 43affa396c9..3ca10480b34 100644
--- a/library/alloc/src/rc.rs
+++ b/library/alloc/src/rc.rs
@@ -1881,7 +1881,7 @@ impl<T: ?Sized> Weak<T> {
 
         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 8917e2d4b40..306c0c91e4b 100644
--- a/library/alloc/src/sync.rs
+++ b/library/alloc/src/sync.rs
@@ -1666,7 +1666,7 @@ impl<T: ?Sized> Weak<T> {
 
         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.