fork/rust

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

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

1.42.0
712 B20 linesraw
1error[E0007]: cannot bind by-move with sub-bindings
2  --> $DIR/bind-by-move-no-subbindings-fun-param.rs:9:6
3   |
4LL | fn f(a @ A(u): A) -> Box<u8> {
5   |      ^^^^^^^^ binds an already bound by-move value by moving it
6
7error[E0382]: use of moved value
8  --> $DIR/bind-by-move-no-subbindings-fun-param.rs:9:12
9   |
10LL | fn f(a @ A(u): A) -> Box<u8> {
11   |      ------^-
12   |      |     |
13   |      |     value used here after move
14   |      value moved here
15   |      move occurs because value has type `A`, which does not implement the `Copy` trait
16
17error: aborting due to 2 previous errors
18
19Some errors have detailed explanations: E0007, E0382.
20For more information about an error, try `rustc --explain E0007`.