1 warning[E0507]: cannot move out of borrowed content
2 --> $DIR/match-guards-always-borrow.rs:23:13
4 LL | (|| { let bar = foo; bar.take() })();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
7 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
8 It represents potential unsoundness in your code.
9 This warning will become a hard error in the future.
11 warning[E0507]: cannot move out of `foo`, as it is immutable for the pattern guard
12 --> $DIR/match-guards-always-borrow.rs:23:13
14 LL | (|| { let bar = foo; bar.take() })();
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 | cannot move out of `foo`, as it is immutable for the pattern guard
20 = note: variables bound in patterns are immutable until the end of the pattern guard
21 = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
22 It represents potential unsoundness in your code.
23 This warning will become a hard error in the future.
25 error: compilation successful
26 --> $DIR/match-guards-always-borrow.rs:57:1
28 LL | / fn main() { //[ast]~ ERROR compilation successful
29 LL | | should_reject_destructive_mutate_in_guard();
30 LL | | allow_mutate_in_arm_body();
31 LL | | allow_move_into_arm_body();
35 error: aborting due to previous error
37 For more information about this error, try `rustc --explain E0507`.