This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit f4ea009
authored
Unrolled build for rust-lang#121287
Rollup merge of rust-lang#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]`.2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
| 1332 | + | |
1332 | 1333 | | |
1333 | 1334 | | |
1334 | 1335 | | |
| |||
2970 | 2971 | | |
2971 | 2972 | | |
2972 | 2973 | | |
2973 | | - | |
| 2974 | + | |
2974 | 2975 | | |
2975 | 2976 | | |
2976 | 2977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2719 | 2719 | | |
2720 | 2720 | | |
2721 | 2721 | | |
2722 | | - | |
| 2722 | + | |
2723 | 2723 | | |
2724 | 2724 | | |
2725 | 2725 | | |
| |||
0 commit comments