diff options
| author | Jon Bauman <baumanj@users.noreply.github.com> | 2025-04-29 11:24:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-29 11:24:31 -0700 |
| commit | dd20225681cf581066afab23db0c0d854806370d (patch) | |
| tree | 8e3723a464462a0d3b21ad7104f2fdb18cf54a7f | |
| parent | efcbb94dccbe0fcc1076f031f88332db4a6a2a52 (diff) | |
| download | rust-dd20225681cf581066afab23db0c0d854806370d.tar.gz rust-dd20225681cf581066afab23db0c0d854806370d.zip | |
Update rc.rs docs
`wrapped_add` is used, not `checked_add`
| -rw-r--r-- | library/alloc/src/rc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 619d9f258e3..247afc62832 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -3536,7 +3536,7 @@ impl<T> Default for Weak<T> { } } -// NOTE: We checked_add here to deal with mem::forget safely. In particular +// NOTE: We wrapping_add here to deal with mem::forget safely. In particular // if you mem::forget Rcs (or Weaks), the ref-count can overflow, and then // you can free the allocation while outstanding Rcs (or Weaks) exist. // We abort because this is such a degenerate scenario that we don't care about |
