Clean up arg mismatch diagnostic, generalize tuple wrap suggestion#98607
Merged
bors merged 3 commits intorust-lang:masterfrom Jun 29, 2022
Merged
Clean up arg mismatch diagnostic, generalize tuple wrap suggestion#98607bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Contributor
|
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
1c9b2d5 to
a3a7d62
Compare
a3a7d62 to
7533777
Compare
1328fe7 to
23f3b0d
Compare
Contributor
|
Took me a bit to untangle the happy-path/error-path difference in @bors r+ |
Collaborator
|
📌 Commit 23f3b0d has been approved by |
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Jun 29, 2022
…on, r=oli-obk Clean up arg mismatch diagnostic, generalize tuple wrap suggestion This is based on top of rust-lang#97542, so just look at the last commit which contains the relevant changes. 1. Remove `final_arg_types` which was one of the last places we were using raw (`usize`) indices instead of typed indices in the arg mismatch suggestion code. 2. Improve the tuple wrap suggestion, now we suggest things like `call(a, b, c, d)` -> `call(a, (b, c), d)` 😺 3. Folded in fix rust-lang#98645
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 29, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#98415 (Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic`) - rust-lang#98479 (Add `fetch_not` method on `AtomicBool`) - rust-lang#98499 (Erase regions in New Abstract Consts) - rust-lang#98516 (library: fix uefi va_list type definition) - rust-lang#98554 (Fix box with custom allocator in miri) - rust-lang#98607 (Clean up arg mismatch diagnostic, generalize tuple wrap suggestion) - rust-lang#98625 (emit Retag for compound types with reference fields) 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.
This is based on top of #97542, so just look at the last commit which contains the relevant changes.
final_arg_typeswhich was one of the last places we were using raw (usize) indices instead of typed indices in the arg mismatch suggestion code.call(a, b, c, d)->call(a, (b, c), d)😺