fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.1 KiB26 linesraw
1error[E0303]: pattern bindings are not allowed after an `@`
2  --> $DIR/pattern-bindings-after-at.rs:8:31
3   |
4LL |         ref mut z @ &mut Some(ref a) => {
5   |                               ^^^^^ not allowed after `@`
6
7warning[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable
8  --> $DIR/pattern-bindings-after-at.rs:8:31
9   |
10LL |         ref mut z @ &mut Some(ref a) => {
11   |         ----------------------^^^^^-
12   |         |                     |
13   |         |                     immutable borrow occurs here
14   |         mutable borrow occurs here
15...
16LL |             **z = None;
17   |             ---------- mutable borrow later used here
18   |
19   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
20   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
21   = note: for more information, try `rustc --explain E0729`
22
23error: aborting due to previous error
24
25Some errors have detailed explanations: E0303, E0502.
26For more information about an error, try `rustc --explain E0303`.