mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 00:24:03 +00:00
62ba3e70a1
The previous output was unintuitive to users.
15 lines
276 B
Rust
15 lines
276 B
Rust
// 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() {}
|