mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
19 lines
361 B
Rust
19 lines
361 B
Rust
//@ 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() {}
|