rust/tests/ui/thir-print/thir-flat-const-variant.rs

19 lines
359 B
Rust
Raw Normal View History

2023-07-01 14:15:22 -05:00
// compile-flags: -Z unpretty=thir-flat
// check-pass
// Previously, the constants with `Self::Bar(())` would be `Call`s instead of
// `Adt`s in THIR.
pub enum Foo {
Bar(()),
}
impl Foo {
const BAR1: Foo = Foo::Bar(());
const BAR2: Foo = Self::Bar(());
const BAR3: Self = Foo::Bar(());
const BAR4: Self = Self::Bar(());
}
fn main() {}