-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Consolidate pattern check errors #53840
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Comments
@estebank can I take this on, if nobody is working on it. |
@PramodBisht that would be great! |
@estebank if we collect them first and then emit once then there can be a case where the diagnostic order is different from the present state. Is that okay? |
That should be fine. |
PramodBisht
added a commit
to PramodBisht/rust
that referenced
this issue
Oct 2, 2018
we are consolidating `cannot bind by-move and by-ref in the same pattern` message present on the different lines into single diagnostic message. To do this, we are first gathering those spans into the vector after that we are throwing them with the help of MultiSpan in a separate block. Addresses: rust-lang#53840
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 2, 2018
rust-lang#53840: Consolidate pattern check errors rust-lang#53840 on this PR we are aggregating `cannot bind by-move and by-ref in the same pattern` message present on the different lines into one diagnostic message. Here we are first gathering those `spans` on `vector` then we are throwing them with the help of `MultiSpan` r? @estebank Addresses: rust-lang#53480
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 2, 2018
rust-lang#53840: Consolidate pattern check errors rust-lang#53840 on this PR we are aggregating `cannot bind by-move and by-ref in the same pattern` message present on the different lines into one diagnostic message. Here we are first gathering those `spans` on `vector` then we are throwing them with the help of `MultiSpan` r? @estebank Addresses: rust-lang#53480
bors
added a commit
that referenced
this issue
Oct 2, 2018
Rollup of 10 pull requests Successful merges: - #54269 (#53840: Consolidate pattern check errors) - #54458 (Allow both explicit and elided lifetimes in the same impl header) - #54603 (Add `crate::` to trait suggestions in Rust 2018.) - #54648 (Update Cargo's submodule) - #54680 (make run-pass tests with empty main just compile-pass tests) - #54687 (Use impl_header_lifetime_elision in libcore) - #54699 (Re-export `getopts` so custom drivers can reference it.) - #54702 (do not promote comparing function pointers) - #54728 (Renumber `proc_macro` tracking issues) - #54745 (make `CStr::from_bytes_with_nul_unchecked()` a const fn) Failed merges: r? @ghost
I think this can be closed now! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Given:
the current pattern check emits one diagnostic per mismatched usage:
Ideally, the pattern check should collect all problematic patterns when possible to reduce how many diagnostics are emitted:
The text was updated successfully, but these errors were encountered: