rust/tests/ui/issues/issue-12567.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-07-15 16:11:54 -05:00
error[E0508]: cannot move out of type `[T]`, a non-copy slice
2019-12-29 18:23:42 -06:00
--> $DIR/issue-12567.rs:2:11
2018-07-15 16:11:54 -05:00
|
LL | match (l1, l2) {
| ^^^^^^^^ cannot move out of here
...
2018-07-15 16:11:54 -05:00
LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
| -- data moved here
LL | => println!("one empty"),
LL | (&[hd1, ..], &[hd2, ..])
2019-12-27 11:53:00 -06:00
| --- ...and here
|
2019-11-25 14:32:57 -06:00
= note: move occurs because these variables have types that don't implement the `Copy` trait
help: consider borrowing the pattern binding
|
LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
| +++
help: consider borrowing the pattern binding
|
LL | (&[ref hd1, ..], &[hd2, ..])
| +++
2018-07-15 16:11:54 -05:00
error[E0508]: cannot move out of type `[T]`, a non-copy slice
2019-12-29 18:23:42 -06:00
--> $DIR/issue-12567.rs:2:11
2018-07-15 16:11:54 -05:00
|
LL | match (l1, l2) {
| ^^^^^^^^ cannot move out of here
...
LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
| -- data moved here
LL | => println!("one empty"),
2018-07-15 16:11:54 -05:00
LL | (&[hd1, ..], &[hd2, ..])
2019-12-27 11:53:00 -06:00
| --- ...and here
2018-07-15 16:11:54 -05:00
|
2019-11-25 14:32:57 -06:00
= note: move occurs because these variables have types that don't implement the `Copy` trait
help: consider borrowing the pattern binding
|
LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
| +++
help: consider borrowing the pattern binding
|
LL | (&[hd1, ..], &[ref hd2, ..])
| +++
2018-07-15 16:11:54 -05:00
error: aborting due to 2 previous errors
2018-07-15 16:11:54 -05:00
For more information about this error, try `rustc --explain E0508`.