]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-31287-drop-in-guard.rs
Rollup merge of #91312 - terrarier2111:anon-const-ice, r=jackh726
[rust.git] / src / test / ui / borrowck / issue-31287-drop-in-guard.rs
1 fn main() {
2     let a = Some("...".to_owned());
3     let b = match a {
4         Some(_) if { drop(a); false } => None,
5         x => x, //~ ERROR use of moved value: `a`
6     };
7     println!("{:?}", b);
8 }