Add #[must_use] to conversions that move self
This commit is contained in:
parent
6928fafe06
commit
b115781bcd
19 changed files with 54 additions and 11 deletions
|
@ -2130,6 +2130,7 @@ impl<T: ?Sized> Weak<T> {
|
|||
///
|
||||
/// [`from_raw`]: Weak::from_raw
|
||||
/// [`as_ptr`]: Weak::as_ptr
|
||||
#[must_use = "`self` will be dropped if the result is not used"]
|
||||
#[stable(feature = "weak_into_raw", since = "1.45.0")]
|
||||
pub fn into_raw(self) -> *const T {
|
||||
let result = self.as_ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue