]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/miri_unleashed/drop.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / miri_unleashed / drop.rs
CommitLineData
dfeec247 1// compile-flags: -Zunleash-the-miri-inside-of-you
1b1a35ee 2// error-pattern: calling non-const function `<Vec<i32> as Drop>::drop`
f9f354fc 3#![allow(const_err)]
dfeec247
XL
4
5use std::mem::ManuallyDrop;
6
7fn main() {}
8
9static TEST_OK: () = {
10 let v: Vec<i32> = Vec::new();
11 let _v = ManuallyDrop::new(v);
12};
13
14// Make sure we catch executing bad drop functions.
15// The actual error is tested by the error-pattern above.
16static TEST_BAD: () = {
17 let _v: Vec<i32> = Vec::new();
dfeec247 18};