fork/rust

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

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

1.42.0
2.0 KiB51 linesraw
1error[E0007]: cannot bind by-move with sub-bindings
2  --> $DIR/copy-and-move-mixed.rs:11:9
3   |
4LL |     let a @ NC(b, c) = NC(C, C);
5   |         ^^^^^^^^^^^^ binds an already bound by-move value by moving it
6
7error[E0007]: cannot bind by-move with sub-bindings
8  --> $DIR/copy-and-move-mixed.rs:15:9
9   |
10LL |     let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
11   |         ^^^^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
12
13error[E0007]: cannot bind by-move with sub-bindings
14  --> $DIR/copy-and-move-mixed.rs:15:19
15   |
16LL |     let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
17   |                   ^^^^^^^^^^^^ binds an already bound by-move value by moving it
18
19error[E0382]: use of moved value
20  --> $DIR/copy-and-move-mixed.rs:11:19
21   |
22LL |     let a @ NC(b, c) = NC(C, C);
23   |         ----------^-   -------- move occurs because value has type `NC<C, C>`, which does not implement the `Copy` trait
24   |         |         |
25   |         |         value used here after move
26   |         value moved here
27
28error[E0382]: use of moved value
29  --> $DIR/copy-and-move-mixed.rs:15:19
30   |
31LL |     let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
32   |         ----------^^^^^^^^^^^^-   --------------- move occurs because value has type `NC<C, NC<C, C>>`, which does not implement the `Copy` trait
33   |         |         |
34   |         |         value used here after move
35   |         value moved here
36
37error[E0382]: use of moved value
38  --> $DIR/copy-and-move-mixed.rs:15:29
39   |
40LL |     let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
41   |                   ----------^-
42   |                   |         |
43   |                   |         value used here after move
44   |                   value moved here
45   |
46   = note: move occurs because value has type `NC<C, C>`, which does not implement the `Copy` trait
47
48error: aborting due to 6 previous errors
49
50Some errors have detailed explanations: E0007, E0382.
51For more information about an error, try `rustc --explain E0007`.