]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/const-eval-span.rs
Auto merge of #81132 - bugadani:map-prealloc, r=matthewjasper
[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 }
13
14 fn main() {}