668491a892
Turns out that tracking write locks by their lifetime is not precise enough, but for now, we don't have an alternative. Also, we need to force_allocate what we acquire or else the memory will not be in the right state.
11 lines
283 B
Rust
11 lines
283 B
Rust
// Validation forces more allocation; disable it.
|
|
// compile-flags: -Zmir-emit-validate=0
|
|
#![feature(box_syntax, custom_attribute, attr_literals)]
|
|
#![miri(memory_size=2048)]
|
|
|
|
fn main() {
|
|
loop {
|
|
::std::mem::forget(box 42); //~ ERROR tried to allocate 4 more bytes
|
|
}
|
|
}
|