-
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
diagnostics: use rustc_on_unimplemented to recommend [].iter()
#94746
diagnostics: use rustc_on_unimplemented to recommend [].iter()
#94746
Conversation
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
98d9d80
to
f8dd9d8
Compare
This comment has been minimized.
This comment has been minimized.
f8dd9d8
to
81e9fad
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.
This looks good to me - diagnostics are much improved.
@bors r+ |
📌 Commit 81e9fad has been approved by |
…-unimplemented, r=davidtwco diagnostics: use rustc_on_unimplemented to recommend `[].iter()` To make this work, the `#[rustc_on_unimplemented]` data needs to be used to report method resolution errors, which is most of what this commit does. Fixes rust-lang#94581
⌛ Testing commit 81e9fad with merge 98b46a5f9d617746a362517cb83438c64faf213b... |
@bors r- |
This comment has been minimized.
This comment has been minimized.
To make this work, the `#[rustc_on_unimplemented]` data needs to be used to report method resolution errors, which is most of what this commit does. Fixes rust-lang#94581
81e9fad
to
32d7f81
Compare
Okay, the change I pushed should restore the old error message ordering, by making sure all the extra annotations are pushed to the |
@bors r+ |
📌 Commit 32d7f81 has been approved by |
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#92150 (Improve suggestion when casting usize to (possibly) wide pointer) - rust-lang#94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`) - rust-lang#94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`) - rust-lang#94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`) - rust-lang#94788 (Account for suggestions for complete removal of lines) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes a minor regression caused by rust-lang#94746, where iter::Filter is spurriously declared "not an iterator."
…, r=oli-obk diagnostics: do not spurriously claim something is "not an iterator" Fixes a minor regression caused by rust-lang#94746, where `iter::Filter` is spurriously declared "not an iterator."
To make this work, the
#[rustc_on_unimplemented]
data needs to be used toreport method resolution errors, which is most of what this commit does.
Fixes #94581