]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-migrate-to-nll.edition.stderr
Auto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelix
[rust.git] / src / test / ui / borrowck / borrowck-migrate-to-nll.edition.stderr
1 warning[E0507]: cannot move out of borrowed content
2   --> $DIR/borrowck-migrate-to-nll.rs:35:17
3    |
4 LL |                 (|| { let bar = foo; bar.take() })();
5    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
6    |
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.
10
11 warning[E0507]: cannot move out of `foo`, as it is immutable for the pattern guard
12   --> $DIR/borrowck-migrate-to-nll.rs:35:17
13    |
14 LL |                 (|| { let bar = foo; bar.take() })();
15    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16    |                 |
17    |                 cannot move out of `foo`, as it is immutable for the pattern guard
18    |                 cannot move
19    |
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.
24