diff options
| author | Michael Bradshaw <mjbshaw@google.com> | 2022-03-23 08:14:53 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-23 08:14:53 -0600 |
| commit | 8d14c03568d0ec99c586e17ce19a93cc0684ab9e (patch) | |
| tree | 43b270e7390802d2798a4f5b9948880c2687c85b | |
| parent | f5dd42bce59bdd8ce5def70e2c87349434eb90a9 (diff) | |
| download | rust-8d14c03568d0ec99c586e17ce19a93cc0684ab9e.tar.gz rust-8d14c03568d0ec99c586e17ce19a93cc0684ab9e.zip | |
Explicitly mention overflow is what we're checking
| -rw-r--r-- | library/alloc/src/rc.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 858bbeb6bf3..6ec86047fe4 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2524,8 +2524,8 @@ trait RcInnerPtr { self.strong_ref().set(strong); // We want to abort on overflow instead of dropping the value. - // Checking after the store instead of before allows for - // slightly better code generation. + // Checking for overflow after the store instead of before + // allows for slightly better code generation. if core::intrinsics::unlikely(strong == 0) { abort(); } @@ -2557,8 +2557,8 @@ trait RcInnerPtr { self.weak_ref().set(weak); // We want to abort on overflow instead of dropping the value. - // Checking after the store instead of before allows for - // slightly better code generation. + // Checking for overflow after the store instead of before + // allows for slightly better code generation. if core::intrinsics::unlikely(weak == 0) { abort(); } |
