]>
Commit | Line | Data |
---|---|---|
ba9703b0 | 1 | // ignore-wasm32-bare compiled with panic=abort by default |
7cac9316 XL |
2 | // check that we clear the "ADT master drop flag" even when there are |
3 | // no fields to be dropped. | |
4 | ||
3dfed10e | 5 | // EMIT_MIR issue_41888.main.ElaborateDrops.after.mir |
7cac9316 XL |
6 | fn main() { |
7 | let e; | |
8 | if cond() { | |
9 | e = E::F(K); | |
10 | if let E::F(_k) = e { | |
11 | // older versions of rustc used to not clear the | |
12 | // drop flag for `e` in this path. | |
13 | } | |
14 | } | |
15 | } | |
16 | ||
17 | fn cond() -> bool { false } | |
18 | ||
19 | struct K; | |
20 | ||
21 | enum E { | |
22 | F(K), | |
23 | G(Box<E>) | |
24 | } |