]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-issue-2657-2.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / borrowck / borrowck-issue-2657-2.rs
1 // run-rustfix
2 fn main() {
3
4     let x: Option<Box<_>> = Some(Box::new(1));
5
6     match x {
7       Some(ref y) => {
8         let _b = *y; //~ ERROR cannot move out
9       }
10       _ => {}
11     }
12 }