-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #53147 - ashtneoi:dont-suggest-ref, r=estebank
For move errors, suggest match ergonomics instead of `ref` Partially fixes issue #52423. Also makes errors and suggestions more consistent between move-from-place and move-from-value errors. Limitations: - Only the first pattern in a match arm can have a "consider removing this borrow operator" suggestion. - Suggestions don't always compile as-is (see the TODOs in the test for details). Sorry for the really long test. I wanted to make sure I handled every case I could think of, and it turned out there were a lot of them. Questions: - Is there any particular applicability I should set on those suggestions? - Are the notes about the `Copy` trait excessive?
- Loading branch information
Showing
49 changed files
with
3,104 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.