blob: 1846da22cd3d4bf099dd88d40d554195b7b40a53 [file]
// Check that error in constant evaluation of enum discriminant
// provides the context for what caused the evaluation.
struct S(i32);
const CONSTANT: S = S(0);
enum E {
V = CONSTANT,
//~^ ERROR: mismatched types
//~| NOTE: expected `isize`, found `S`
//~| NOTE: enum variant discriminant
}
fn main() {}