]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-28839.rs
Merge commit 'a98e7ab8b94485be6bd03e0c6b8682ecab5b52e6' into clippyup
[rust.git] / src / test / ui / issues / issue-28839.rs
1 // run-pass
2 // ignore-pretty issue #37199
3
4 pub struct Foo;
5
6 pub fn get_foo2<'a>(foo: &'a mut Option<&'a mut Foo>) -> &'a mut Foo {
7     match foo {
8         // Ensure that this is not considered a move, but rather a reborrow.
9         &mut Some(ref mut x) => *x,
10         &mut None => panic!(),
11     }
12 }
13
14 fn main() {
15 }