]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/control-flow/assert.rs
1 // Test that `assert` works when `const_panic` is enabled.
3 // revisions: stock const_panic
5 #![cfg_attr(const_panic, feature(const_panic))]
7 const _
: () = assert
!(true);
8 //[stock]~^ ERROR panicking in constants is unstable
10 const _
: () = assert
!(false);
11 //[stock]~^ ERROR panicking in constants is unstable
12 //[const_panic]~^^ ERROR evaluation of constant value failed