Suggest returning local on "expected ty, found ()" due to expr-less block#98784
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 20, 2022
Merged
Conversation
compiler-errors
commented
Jul 1, 2022
estebank
reviewed
Jul 1, 2022
estebank
reviewed
Jul 1, 2022
This comment has been minimized.
This comment has been minimized.
estebank
reviewed
Jul 1, 2022
Comment on lines
+887
to
+891
Contributor
There was a problem hiding this comment.
preexisting: This stands out to me. I guess we didn't have the statement span without the semicolon to suggest Box::new( before?
Contributor
Author
There was a problem hiding this comment.
I will fix that -- we should be able to strip the semicolon and provide a full suggestion (MaybeIncorrect, still) to box it
5bd41c5 to
a697665
Compare
estebank
reviewed
Jul 1, 2022
Contributor
Author
|
@rustbot author |
Collaborator
|
☔ The latest upstream changes (presumably #99078) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 10, 2022
…k-compatible, r=estebank Do not call `check_expr` in `check_compatible`, since it has side-effects Fixes a weird suggestion in rust-lang#98784 found later: Fixes rust-lang#98894 Fixes rust-lang#98897
estebank
reviewed
Jul 18, 2022
a697665 to
bc64fb0
Compare
Contributor
Author
|
@rustbot ready this is ready for another round of review i think, fixed the whitespace issue |
estebank
reviewed
Jul 19, 2022
bc64fb0 to
b0a8190
Compare
Contributor
Author
|
@bors r=estebank |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 20, 2022
Rollup of 5 pull requests Successful merges: - rust-lang#98784 (Suggest returning local on "expected `ty`, found `()`" due to expr-less block) - rust-lang#98916 (Windows: Use `FindFirstFileW` for getting the metadata of locked system files) - rust-lang#99433 (Erase regions before comparing signatures of foreign fns.) - rust-lang#99452 (int_macros was only using to_xe_bytes_doc and not from_xe_bytes_doc) - rust-lang#99481 (Add regression test for rust-lang#71547) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Putting this up for initial review. Notably, this doesn't consider if the value has possibly been moved, or whether the type is
Copy. It also provides a structured suggestion if there's one "preferred" binding that matches the type (i.e. one binding in the block or its parent), otherwise it just points them out if there's fewer than 4 of them.Fixes #98177
r? @estebank