]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/pattern-bindings-after-at.stderr
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / pattern / pattern-bindings-after-at.stderr
1 error[E0303]: pattern bindings are not allowed after an `@`
2   --> $DIR/pattern-bindings-after-at.rs:8:31
3    |
4 LL |         ref mut z @ &mut Some(ref a) => {
5    |                               ^^^^^ not allowed after `@`
6
7 warning[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable
8   --> $DIR/pattern-bindings-after-at.rs:8:31
9    |
10 LL |         ref mut z @ &mut Some(ref a) => {
11    |         ----------------------^^^^^-
12    |         |                     |
13    |         |                     immutable borrow occurs here
14    |         mutable borrow occurs here
15 ...
16 LL |             **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
23 error: aborting due to previous error
24
25 Some errors have detailed explanations: E0303, E0502.
26 For more information about an error, try `rustc --explain E0303`.