rust/tests/compile-fail/memleak.rs

7 lines
159 B
Rust

// error-pattern: the evaluated program leaked memory
// normalize-stderr-test: ".*│.*" -> "$$stripped$$"
fn main() {
std::mem::forget(Box::new(42));
}