summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/const-eval-span.rs
blob: 59f4b138249b22fad63329522769978afe5da26e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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 struct `S`
    //~|         found type `S`
}

fn main() {}