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