]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/const-eval-span.rs
Rollup merge of #62257 - RalfJung:miri-c-str, r=estebank
[rust.git] / src / test / 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     //~|         found type `S`
13 }
14
15 fn main() {}