diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-05 06:40:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-05 06:40:30 +0100 |
| commit | 72651306b3e6d7308bb35897501940cd9b97baff (patch) | |
| tree | acc54f8c81b6da6119f0a0a4384972d809dc77c3 /compiler/rustc_pattern_analysis/src | |
| parent | 22827fd5b1ca5f4a588dab2ae50c3b7a138d89b0 (diff) | |
| parent | 261da5fc4b2f015436a206f217300f6616628052 (diff) | |
| download | rust-72651306b3e6d7308bb35897501940cd9b97baff.tar.gz rust-72651306b3e6d7308bb35897501940cd9b97baff.zip | |
Rollup merge of #121287 - zachs18:rc-into-raw-must-use, r=cuviper
Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.
The current `#[must_use]` messages for `{sync,rc}::Weak::into_raw` ("`self` will be dropped if the result is not used") are misleading, as `self` is consumed and will *not* be dropped.
This PR changes their `#[must_use]` message to the same as `Arc::into_raw`'s[ current `#[must_use]` message](https://github.com/rust-lang/rust/blob/d5735645753e990a72446094f703df9b5e421555/library/alloc/src/sync.rs#L1482) ("losing the pointer will leak memory"), and also adds it to `Rc::into_raw`, which is not currently `#[must_use]`.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
