]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/miri_unleashed/drop.rs
1 // compile-flags: -Zunleash-the-miri-inside-of-you
2 // error-pattern: calling non-const function `<std::vec::Vec<i32> as std::ops::Drop>::drop`
5 use std
::mem
::ManuallyDrop
;
10 let v
: Vec
<i32> = Vec
::new();
11 let _v
= ManuallyDrop
::new(v
);
14 // Make sure we catch executing bad drop functions.
15 // The actual error is tested by the error-pattern above.
16 static TEST_BAD
: () = {
17 let _v
: Vec
<i32> = Vec
::new();