fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.4 KiB41 linesraw
1error[E0009]: cannot bind by-move and by-ref in the same pattern
2  --> $DIR/default-binding-modes-both-sides-independent.rs:27:17
3   |
4LL |     let ref a @ b = NotCopy;
5   |         --------^
6   |         |       |
7   |         |       by-move pattern here
8   |         by-ref pattern here
9
10error[E0009]: cannot bind by-move and by-ref in the same pattern
11  --> $DIR/default-binding-modes-both-sides-independent.rs:28:21
12   |
13LL |     let ref mut a @ b = NotCopy;
14   |         ------------^
15   |         |           |
16   |         |           by-move pattern here
17   |         by-ref pattern here
18
19error[E0009]: cannot bind by-move and by-ref in the same pattern
20  --> $DIR/default-binding-modes-both-sides-independent.rs:30:20
21   |
22LL |         Ok(ref a @ b) | Err(ref a @ b) => {}
23   |            --------^        --------^
24   |            |       |        |       |
25   |            |       |        |       by-move pattern here
26   |            |       |        by-ref pattern here
27   |            |       by-move pattern here
28   |            by-ref pattern here
29
30error[E0009]: cannot bind by-move and by-ref in the same pattern
31  --> $DIR/default-binding-modes-both-sides-independent.rs:34:17
32   |
33LL |         ref a @ b => {}
34   |         --------^
35   |         |       |
36   |         |       by-move pattern here
37   |         by-ref pattern here
38
39error: aborting due to 4 previous errors
40
41For more information about this error, try `rustc --explain E0009`.