]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/move-ref-patterns/feature-gate-move_ref_pattern.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / pattern / move-ref-patterns / feature-gate-move_ref_pattern.stderr
CommitLineData
74b04a01
XL
1error[E0658]: binding by-move and by-ref in the same pattern is unstable
2 --> $DIR/feature-gate-move_ref_pattern.rs:8:15
3 |
4LL | 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
12error[E0658]: binding by-move and by-ref in the same pattern is unstable
13 --> $DIR/feature-gate-move_ref_pattern.rs:13:17
14 |
15LL | 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
23error[E0658]: binding by-move and by-ref in the same pattern is unstable
24 --> $DIR/feature-gate-move_ref_pattern.rs:16:13
25 |
26LL | 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
34error[E0658]: binding by-move and by-ref in the same pattern is unstable
35 --> $DIR/feature-gate-move_ref_pattern.rs:20:10
36 |
37LL | 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
45error[E0507]: cannot move out of a shared reference
46 --> $DIR/feature-gate-move_ref_pattern.rs:16:22
47 |
48LL | 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
54error[E0507]: cannot move out of a mutable reference
55 --> $DIR/feature-gate-move_ref_pattern.rs:20:22
56 |
57LL | 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
63error: aborting due to 6 previous errors
64
65Some errors have detailed explanations: E0507, E0658.
66For more information about an error, try `rustc --explain E0507`.