]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/deaggregator_test_multiple.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / mir-opt / deaggregator_test_multiple.rs
1 // unit-test: Deaggregator
2 // Test that deaggregate fires more than once per block
3
4 enum Foo {
5     A(i32),
6     B,
7 }
8
9 // EMIT_MIR deaggregator_test_multiple.test.Deaggregator.diff
10 fn test(x: i32) -> [Foo; 2] {
11     [Foo::A(x), Foo::A(x)]
12 }
13
14 fn main() {
15     // Make sure the function actually gets instantiated.
16     test(0);
17 }