2025-07-01 23:37:49 +05:00
|
|
|
//! 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>.
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2025-07-01 23:37:49 +05:00
|
|
|
//@ run-pass
|
2013-08-17 08:37:42 -07:00
|
|
|
|
2021-08-25 02:39:40 +02:00
|
|
|
pub fn main() {
|
|
|
|
|
let y: Box<_> = Box::new(1);
|
2025-07-01 23:37:49 +05:00
|
|
|
drop(y);
|
2013-02-14 11:47:00 -08:00
|
|
|
}
|