2015-09-25 21:52:34 -05:00
|
|
|
// 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,
|
2017-02-15 07:00:20 -06:00
|
|
|
//~^ ERROR mismatched types
|
2023-01-02 20:00:33 -06:00
|
|
|
//~| expected `isize`, found `S`
|
2015-09-25 21:52:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|