]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-nll.stderr
Add FAQ for NLL migration
[rust.git] / src / test / ui / feature-gates / feature-gate-nll.stderr
1 warning[E0502]: cannot borrow `*x.1` as immutable because it is also borrowed as mutable
2   --> $DIR/feature-gate-nll.rs:14:13
3    |
4 LL |     let m = &mut x;
5    |             ------ mutable borrow occurs here
6 LL |     let p = &*x.1;
7    |             ^^^^^ immutable borrow occurs here
8 ...
9 LL |     m;
10    |     - mutable borrow later used here
11    |
12    = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
13    = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
14    = note: for more information, try `rustc --explain E0729`
15
16 error: compilation successful
17   --> $DIR/feature-gate-nll.rs:10:1
18    |
19 LL | / fn main() {
20 LL | |     let mut x = (33, &0);
21 LL | |
22 LL | |     let m = &mut x;
23 ...  |
24 LL | |     m;
25 LL | | }
26    | |_^
27
28 error: aborting due to previous error
29
30 For more information about this error, try `rustc --explain E0502`.