forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpattern-bindings-after-at.stderr
26 lines (23 loc) · 1.12 KB
/
pattern-bindings-after-at.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
error[E0303]: pattern bindings are not allowed after an `@`
--> $DIR/pattern-bindings-after-at.rs:8:31
|
LL | ref mut z @ &mut Some(ref a) => {
| ^^^^^ not allowed after `@`
warning[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable
--> $DIR/pattern-bindings-after-at.rs:8:31
|
LL | ref mut z @ &mut Some(ref a) => {
| ----------------------^^^^^-
| | |
| | immutable borrow occurs here
| mutable borrow occurs here
...
LL | **z = None;
| ---------- 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: aborting due to previous error
Some errors have detailed explanations: E0303, E0502.
For more information about an error, try `rustc --explain E0303`.