rust/tests/mir-opt/deaggregator_test_multiple.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
324 B
Rust
Raw Normal View History

// unit-test: Deaggregator
// Test that deaggregate fires more than once per block
enum Foo {
A(i32),
B,
}
2020-07-27 19:22:43 +00:00
// EMIT_MIR deaggregator_test_multiple.test.Deaggregator.diff
fn test(x: i32) -> [Foo; 2] {
[Foo::A(x), Foo::A(x)]
}
2017-10-30 17:20:07 +00:00
fn main() {
// Make sure the function actually gets instantiated.
test(0);
}