]>
Commit | Line | Data |
---|---|---|
74b04a01 XL |
1 | error[E0658]: binding by-move and by-ref in the same pattern is unstable |
2 | --> $DIR/feature-gate-move_ref_pattern.rs:8:15 | |
3 | | | |
4 | LL | Some((y, ref z)) => {} | |
5 | | ^ ----- by-ref pattern here | |
6 | | | | |
7 | | by-move pattern here | |
8 | | | |
9 | = note: see issue #68354 <https://github.com/rust-lang/rust/issues/68354> for more information | |
10 | = help: add `#![feature(move_ref_pattern)]` to the crate attributes to enable | |
11 | ||
12 | error[E0658]: binding by-move and by-ref in the same pattern is unstable | |
13 | --> $DIR/feature-gate-move_ref_pattern.rs:13:17 | |
14 | | | |
15 | LL | let (ref a, b) = tup.clone(); | |
16 | | ----- ^ by-move pattern here | |
17 | | | | |
18 | | by-ref pattern here | |
19 | | | |
20 | = note: see issue #68354 <https://github.com/rust-lang/rust/issues/68354> for more information | |
21 | = help: add `#![feature(move_ref_pattern)]` to the crate attributes to enable | |
22 | ||
23 | error[E0658]: binding by-move and by-ref in the same pattern is unstable | |
24 | --> $DIR/feature-gate-move_ref_pattern.rs:16:13 | |
25 | | | |
26 | LL | let (a, mut b) = &tup; | |
27 | | - ^^^^^ by-move pattern here | |
28 | | | | |
29 | | by-ref pattern here | |
30 | | | |
31 | = note: see issue #68354 <https://github.com/rust-lang/rust/issues/68354> for more information | |
32 | = help: add `#![feature(move_ref_pattern)]` to the crate attributes to enable | |
33 | ||
34 | error[E0658]: binding by-move and by-ref in the same pattern is unstable | |
35 | --> $DIR/feature-gate-move_ref_pattern.rs:20:10 | |
36 | | | |
37 | LL | let (mut a, b) = &mut tup; | |
38 | | ^^^^^ - by-ref pattern here | |
39 | | | | |
40 | | by-move pattern here | |
41 | | | |
42 | = note: see issue #68354 <https://github.com/rust-lang/rust/issues/68354> for more information | |
43 | = help: add `#![feature(move_ref_pattern)]` to the crate attributes to enable | |
44 | ||
45 | error[E0507]: cannot move out of a shared reference | |
46 | --> $DIR/feature-gate-move_ref_pattern.rs:16:22 | |
47 | | | |
48 | LL | let (a, mut b) = &tup; | |
49 | | ----- ^^^^ | |
50 | | | | |
51 | | data moved here | |
1b1a35ee | 52 | | move occurs because `b` has type `X`, which does not implement the `Copy` trait |
74b04a01 XL |
53 | |
54 | error[E0507]: cannot move out of a mutable reference | |
55 | --> $DIR/feature-gate-move_ref_pattern.rs:20:22 | |
56 | | | |
57 | LL | let (mut a, b) = &mut tup; | |
58 | | ----- ^^^^^^^^ | |
59 | | | | |
60 | | data moved here | |
1b1a35ee | 61 | | move occurs because `a` has type `X`, which does not implement the `Copy` trait |
74b04a01 XL |
62 | |
63 | error: aborting due to 6 previous errors | |
64 | ||
65 | Some errors have detailed explanations: E0507, E0658. | |
66 | For more information about an error, try `rustc --explain E0507`. |