2015-09-26 11:52:34 +09: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 15:00:20 +02:00
|
|
|
//~^ ERROR mismatched types
|
2023-01-02 18:00:33 -08:00
|
|
|
//~| expected `isize`, found `S`
|
2015-09-26 11:52:34 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|