]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/invalid_constant.rs
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / mir-opt / const_prop / invalid_constant.rs
1 // Verify that we can pretty print invalid constant introduced
2 // by constant propagation. Regression test for issue #93688.
3 //
4 // compile-flags: -Copt-level=0 -Zinline-mir
5
6 #[inline(always)]
7 pub fn f(x: Option<Option<()>>) -> Option<()> {
8     match x {
9         None => None,
10         Some(y) => y,
11     }
12 }
13
14 // EMIT_MIR invalid_constant.main.ConstProp.diff
15 fn main() {
16     f(None);
17 }