rust/tests/compile-fail/memleak.rs

9 lines
205 B
Rust
Raw Normal View History

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