rust/tests/compile-fail/memleak.rs

8 lines
157 B
Rust
Raw Normal View History

// ignore-windows: We do not check leaks on Windows
2018-08-30 08:57:33 +02:00
2017-02-15 09:03:07 +01:00
//error-pattern: the evaluated program leaked memory
fn main() {
std::mem::forget(Box::new(42));
}