rust/tests/compile-fail/memleak.rs
2020-03-27 19:39:35 +01:00

8 lines
157 B
Rust

// ignore-windows: We do not check leaks on Windows
//error-pattern: the evaluated program leaked memory
fn main() {
std::mem::forget(Box::new(42));
}