]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/issue-99470-move-out-of-some.rs
Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrum
[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 }