about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-29 12:40:12 +0000
committerbors <bors@rust-lang.org>2018-06-29 12:40:12 +0000
commitab8a67c12adc6ba84b6143a539640d5962ef6cbe (patch)
tree369362bb7a54b0f6e4794cedb6062f9e7a3f740f /src/rustllvm/PassWrapper.cpp
parent6e5e63a48c3be7de2faf914c2a9e194ff7cede9e (diff)
parent2cb0a0631a640318ae288ead20758db8508f6835 (diff)
downloadrust-ab8a67c12adc6ba84b6143a539640d5962ef6cbe.tar.gz
rust-ab8a67c12adc6ba84b6143a539640d5962ef6cbe.zip
Auto merge of #51729 - matthewjasper:move-errors, r=nikomatsakis
[NLL] Better move errors

Make a number of changes to improve the quality of NLL cannot move errors.

* Group errors that occur in the same `match` with the same cause.
* Suggest `ref`, `&` or removing `*` to avoid the move.
* Show the place being matched on.

Differences from AST borrowck:

* `&` is suggested over `ref` when matching on a place that can't be moved from.
* Removing `*` is suggested instead of adding `&` when applicable.
* Sub-pattern spans aren't used, this would probably need Spans on Places.

Closes #45699
Closes #46627
Closes #51187
Closes #51189

r? @pnkfelix
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions