rust/tests/compile-fail/memleak.rs
2020-07-23 15:56:38 +02:00

6 lines
104 B
Rust

//error-pattern: the evaluated program leaked memory
fn main() {
std::mem::forget(Box::new(42));
}