rust/tests/compile-fail/memleak.rs
2018-08-30 09:41:57 +02:00

9 lines
205 B
Rust

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