2022-08-02 19:44:25 -05:00
|
|
|
// unit-test: Deaggregator
|
2016-12-09 09:28:54 -06:00
|
|
|
// Test that deaggregate fires more than once per block
|
|
|
|
|
|
|
|
enum Foo {
|
|
|
|
A(i32),
|
|
|
|
B,
|
|
|
|
}
|
|
|
|
|
2020-07-27 14:22:43 -05:00
|
|
|
// EMIT_MIR deaggregator_test_multiple.test.Deaggregator.diff
|
2016-12-09 09:28:54 -06:00
|
|
|
fn test(x: i32) -> [Foo; 2] {
|
|
|
|
[Foo::A(x), Foo::A(x)]
|
|
|
|
}
|
|
|
|
|
2017-10-30 12:20:07 -05:00
|
|
|
fn main() {
|
|
|
|
// Make sure the function actually gets instantiated.
|
|
|
|
test(0);
|
|
|
|
}
|