blob: aabdb071bc9fb26586a75ed1c98c1428cd69b3af [file] [log] [blame]
//@ build-fail
struct Bar<const BITS: usize>;
impl<const BITS: usize> Bar<BITS> {
const ASSERT: bool = {
let b = std::convert::identity(1);
["oops"][b]; //~ ERROR evaluation of `Bar::<0>::ASSERT` failed
true
};
fn assert() {
let val = Self::ASSERT;
if val {
std::convert::identity(val);
}
}
}
fn main() {
Bar::<0>::assert();
}