rust/tests/mir-opt/deaggregator_test_multiple.rs
2023-01-11 09:32:08 +00:00

18 lines
324 B
Rust

// unit-test: Deaggregator
// Test that deaggregate fires more than once per block
enum Foo {
A(i32),
B,
}
// EMIT_MIR deaggregator_test_multiple.test.Deaggregator.diff
fn test(x: i32) -> [Foo; 2] {
[Foo::A(x), Foo::A(x)]
}
fn main() {
// Make sure the function actually gets instantiated.
test(0);
}