rust/src/test/ui/issue-53840.stderr
Pramod Bisht e536e64702 Consolidate pattern check errors
we are consolidating `cannot bind by-move and by-ref in the same
pattern` message present on the different lines into single diagnostic
message.

To do this, we are first gathering those spans into the vector
after that we are throwing them with the help of MultiSpan in
a separate block.

Addresses: #53840
2018-10-02 05:51:02 +00:00

20 lines
675 B
Text

error[E0009]: cannot bind by-move and by-ref in the same pattern
--> $DIR/issue-53840.rs:22:16
|
LL | E::Foo(a, b, ref c) => {}
| ^ ^ ----- both by-ref and by-move used
| | |
| | by-move pattern here
| by-move pattern here
error[E0009]: cannot bind by-move and by-ref in the same pattern
--> $DIR/issue-53840.rs:25:14
|
LL | Bar {a, ref b} => {}
| ^ ----- both by-ref and by-move used
| |
| by-move pattern here
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0009`.