Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b9e991a

Browse files
add thir-print test
1 parent 7dfb9ed commit b9e991a

File tree

2 files changed

+417
-0
lines changed

2 files changed

+417
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// compile-flags: -Z unpretty=thir-flat
2+
// check-pass
3+
4+
// Previously, the constants with `Self::Bar(())` would be `Call`s instead of
5+
// `Adt`s in THIR.
6+
7+
pub enum Foo {
8+
Bar(()),
9+
}
10+
11+
impl Foo {
12+
const BAR1: Foo = Foo::Bar(());
13+
const BAR2: Foo = Self::Bar(());
14+
const BAR3: Self = Foo::Bar(());
15+
const BAR4: Self = Self::Bar(());
16+
}
17+
18+
fn main() {}

0 commit comments

Comments
 (0)