mirror of
https://git.proxmox.com/git/rustc
synced 2025-06-01 23:53:31 +00:00
15 lines
283 B
Rust
15 lines
283 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 struct `S`
|
|
}
|
|
|
|
fn main() {}
|