]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/const_prop/control_flow_simplification.rs
Update unsuspicious file list
[rustc.git] / src / test / mir-opt / const_prop / control_flow_simplification.rs
CommitLineData
f2b60f7d 1// unit-test: ConstProp
ba9703b0
XL
2// compile-flags: -Zmir-opt-level=1
3
f2b60f7d
FG
4trait NeedsDrop: Sized {
5 const NEEDS: bool = std::mem::needs_drop::<Self>();
ba9703b0
XL
6}
7
f2b60f7d 8impl<This> NeedsDrop for This {}
ba9703b0 9
3dfed10e
XL
10// EMIT_MIR control_flow_simplification.hello.ConstProp.diff
11// EMIT_MIR control_flow_simplification.hello.PreCodegen.before.mir
ba9703b0
XL
12fn hello<T>(){
13 if <bool>::NEEDS {
14 panic!()
15 }
16}
17
18pub fn main() {
19 hello::<()>();
20 hello::<Vec<()>>();
21}