]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/issue-99470-move-out-of-some.rs
Rollup merge of #107102 - compiler-errors:new-solver-new-candidats-4, r=lcnr
[rust.git] / tests / ui / moves / issue-99470-move-out-of-some.rs
1 fn main() {
2     let x: &Option<Box<i32>> = &Some(Box::new(0));
3
4     match x {
5     //~^ ERROR cannot move out of `x` as enum variant `Some` which is behind a shared reference
6         &Some(_y) => (),
7         &None => (),
8     }
9 }