]> git.lizzy.rs Git - rust.git/blob - tests/codegen/mir_zst_stores.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / mir_zst_stores.rs
1 // compile-flags: -C no-prepopulate-passes
2
3 #![crate_type = "lib"]
4 use std::marker::PhantomData;
5
6 #[derive(Copy, Clone)]
7 struct Zst { phantom: PhantomData<Zst> }
8
9 // CHECK-LABEL: @mir
10 // CHECK-NOT: store{{.*}}undef
11 #[no_mangle]
12 pub fn mir() {
13     let x = Zst { phantom: PhantomData };
14     let y = (x, 0);
15     drop(y);
16     drop((0, x));
17 }