2023-10-16 17:36:39 +00:00
|
|
|
// skip-filecheck
|
2023-06-08 09:18:34 +02:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2022-08-25 16:43:46 +00:00
|
|
|
// unit-test: DataflowConstProp
|
|
|
|
|
|
|
|
fn foo(n: i32) {}
|
|
|
|
|
|
|
|
// EMIT_MIR terminator.main.DataflowConstProp.diff
|
|
|
|
fn main() {
|
|
|
|
let a = 1;
|
2022-11-09 18:03:30 +01:00
|
|
|
// Checks that we propagate into terminators.
|
2022-08-25 16:43:46 +00:00
|
|
|
foo(a + 1);
|
|
|
|
}
|