mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
13 lines
341 B
Rust
13 lines
341 B
Rust
//! Regression test for a crash caused by an "unsused move"
|
|
//! (specifically, a variable bound to a `Box` used as a statement)
|
|
//! leading to incorrect memory zero-filling after drop.
|
|
//!
|
|
//! Regression test for <https://github.com/rust-lang/rust/issues/3878>.
|
|
|
|
//@ run-pass
|
|
|
|
pub fn main() {
|
|
let y: Box<_> = Box::new(1);
|
|
drop(y);
|
|
}
|