]> git.proxmox.com Git - rustc.git/blob - tests/ui/consts/const-eval/const-eval-span.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / const-eval / const-eval-span.rs
1 // Check that error in constant evaluation of enum discriminant
2 // provides the context for what caused the evaluation.
3
4 struct S(i32);
5
6 const CONSTANT: S = S(0);
7
8 enum E {
9 V = CONSTANT,
10 //~^ ERROR mismatched types
11 //~| expected `isize`, found struct `S`
12 }
13
14 fn main() {}