diff options
Diffstat (limited to 'tests/ui/borrowck/borrowck-issue-2657-2.fixed')
-rw-r--r-- | tests/ui/borrowck/borrowck-issue-2657-2.fixed | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-issue-2657-2.fixed b/tests/ui/borrowck/borrowck-issue-2657-2.fixed new file mode 100644 index 000000000..625e7c3ca --- /dev/null +++ b/tests/ui/borrowck/borrowck-issue-2657-2.fixed @@ -0,0 +1,12 @@ +// run-rustfix +fn main() { + + let x: Option<Box<_>> = Some(Box::new(1)); + + match x { + Some(ref y) => { + let _b = y; //~ ERROR cannot move out + } + _ => {} + } +} |