forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfeature-gate-nll.stderr
30 lines (27 loc) · 949 Bytes
/
feature-gate-nll.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
warning[E0502]: cannot borrow `*x.1` as immutable because it is also borrowed as mutable
--> $DIR/feature-gate-nll.rs:14:13
|
LL | let m = &mut x;
| ------ mutable borrow occurs here
LL | let p = &*x.1;
| ^^^^^ immutable borrow occurs here
...
LL | m;
| - mutable borrow later used here
|
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
= note: for more information, try `rustc --explain E0729`
error: compilation successful
--> $DIR/feature-gate-nll.rs:10:1
|
LL | / fn main() {
LL | | let mut x = (33, &0);
LL | |
LL | | let m = &mut x;
... |
LL | | m;
LL | | }
| |_^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0502`.