Skip to content

Commit afccc44

Browse files
add mir dump test
1 parent 07b1912 commit afccc44

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// EMIT_MIR issue_110508.{impl#0}-BAR1.built.after.mir
2+
// EMIT_MIR issue_110508.{impl#0}-BAR2.built.after.mir
3+
4+
enum Foo {
5+
Bar(()),
6+
}
7+
8+
impl Foo {
9+
const BAR1: Foo = Foo::Bar(());
10+
const BAR2: Foo = Self::Bar(());
11+
}
12+
13+
fn main() {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR1` after built
2+
3+
const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR1: Foo = {
4+
let mut _0: Foo;
5+
let mut _1: ();
6+
7+
bb0: {
8+
StorageLive(_1);
9+
_1 = ();
10+
_0 = Foo::Bar(move _1);
11+
StorageDead(_1);
12+
return;
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR2` after built
2+
3+
const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR2: Foo = {
4+
let mut _0: Foo;
5+
let mut _1: ();
6+
7+
bb0: {
8+
StorageLive(_1);
9+
_1 = ();
10+
_0 = Foo::Bar(move _1);
11+
StorageDead(_1);
12+
return;
13+
}
14+
}

0 commit comments

Comments
 (0)