rust/tests/ui/enum-discriminant/issue-41394.rs
Tomasz Miąsko 67f455afe1 Suppress "erroneous constant used" for constants tainted by errors
When constant evaluation fails because its MIR is tainted by errors,
suppress note indicating that erroneous constant was used, since those
errors have to be fixed regardless of the constant being used or not.
2023-05-15 00:00:00 +00:00

11 lines
128 B
Rust

enum Foo {
A = "" + 1
//~^ ERROR cannot add `{integer}` to `&str`
}
enum Bar {
A = Foo::A as isize
}
fn main() {}