summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused/must-use-box-from-raw.rs
blob: 9ea7726894cbcccb3b27b00307561642427fbbfa (plain)
1
2
3
4
5
6
7
8
9
10
11
// #99269

// check-pass

#![warn(unused_must_use)]

unsafe fn free<T>(ptr: *mut T) {
    Box::from_raw(ptr); //~ WARNING unused return value
}

fn main() {}