rust/tests/ui/consts/const-eval/const-eval-span.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
276 B
Rust
Raw Normal View History

// 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
//~| expected `isize`, found `S`
}
fn main() {}