add mir dump test

This commit is contained in:
Eric Mark Martin 2023-07-05 02:19:44 +00:00
parent 07b1912acc
commit afccc44402
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// EMIT_MIR issue_110508.{impl#0}-BAR1.built.after.mir
// EMIT_MIR issue_110508.{impl#0}-BAR2.built.after.mir
enum Foo {
Bar(()),
}
impl Foo {
const BAR1: Foo = Foo::Bar(());
const BAR2: Foo = Self::Bar(());
}
fn main() {}

View File

@ -0,0 +1,14 @@
// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR1` after built
const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR1: Foo = {
let mut _0: Foo;
let mut _1: ();
bb0: {
StorageLive(_1);
_1 = ();
_0 = Foo::Bar(move _1);
StorageDead(_1);
return;
}
}

View File

@ -0,0 +1,14 @@
// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR2` after built
const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR2: Foo = {
let mut _0: Foo;
let mut _1: ();
bb0: {
StorageLive(_1);
_1 = ();
_0 = Foo::Bar(move _1);
StorageDead(_1);
return;
}
}