2022-07-15 08:05:50 +00:00
|
|
|
warning: unused return value of `Box::<T>::from_raw` that must be used
|
|
|
|
--> $DIR/must-use-box-from-raw.rs:8:5
|
|
|
|
|
|
|
|
|
LL | Box::from_raw(ptr);
|
2022-08-16 14:46:33 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2022-07-15 08:05:50 +00:00
|
|
|
|
|
2022-11-05 20:52:18 +00:00
|
|
|
= note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
|
2022-07-15 08:05:50 +00:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/must-use-box-from-raw.rs:5:9
|
|
|
|
|
|
|
|
|
LL | #![warn(unused_must_use)]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2023-03-11 05:28:05 +00:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = Box::from_raw(ptr);
|
|
|
|
| +++++++
|
2022-07-15 08:05:50 +00:00
|
|
|
|
|
|
|
warning: 1 warning emitted
|
|
|
|
|