rust/tests/ui/lint/unused/must-use-box-from-raw.rs

12 lines
158 B
Rust
Raw Normal View History

2022-07-15 03:05:50 -05:00
// #99269
// check-pass
#![warn(unused_must_use)]
unsafe fn free<T>(ptr: *mut T) {
Box::from_raw(ptr); //~ WARNING unused return value
}
fn main() {}