-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up arg mismatch diagnostic, generalize tuple wrap suggestion #98607
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
1c9b2d5
to
a3a7d62
Compare
a3a7d62
to
7533777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1328fe7
to
23f3b0d
Compare
Took me a bit to untangle the happy-path/error-path difference in @bors r+ |
📌 Commit 23f3b0d has been approved by |
…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
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 is based on top of #97542, so just look at the last commit which contains the relevant changes.
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.call(a, b, c, d)
->call(a, (b, c), d)
😺