]> git.proxmox.com Git - rustc.git/blame - tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / mir-opt / dataflow-const-prop / ref_without_sb.rs
CommitLineData
353b0b11 1// ignore-wasm32 compiled with panic=abort by default
487cf647
FG
2// unit-test: DataflowConstProp
3
4#[inline(never)]
5fn escape<T>(x: &T) {}
6
7#[inline(never)]
8fn some_function() {}
9
10// EMIT_MIR ref_without_sb.main.DataflowConstProp.diff
11fn main() {
12 let mut a = 0;
13 escape(&a);
14 a = 1;
15 some_function();
16 // This should currently not be propagated.
17 let b = a;
18}