-
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
fix: wrong trait import suggestion for T: #95991
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @fee1-dead (or someone else) soon. Please see the contribution instructions for more information. |
compiler/rustc_hir/src/hir.rs
Outdated
/// | | ||
/// here | ||
/// ``` | ||
pub fn colon_span_for_suggestions(&self, source_map: &SourceMap) -> Option<Span> { |
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 might possibly merge-conflict with #95970, since it's duplicated from that. Might want to wait on that landing and rebase.
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.
Done
src/test/ui/traits/issue-95898.rs
Outdated
// Test for #95898: The trait suggestion had an extra `:` after the trait. | ||
// edition:2021 | ||
|
||
#[rustfmt::skip] |
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.
I don't think you need rustfmt::skip here. We configured rustfmt to not run on ui tests for this exact reason.
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.
You might need to turn off auto formatting from your IDE to remove this attribute.
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.
Removed rustfmt::skip
, thanks 👍
21af116
to
5f07e22
Compare
Can you please squash the commits? If you want, I can do it for you by having a bot squash the commits. |
5f07e22
to
9b9f677
Compare
Done |
Thanks! @bors r+ rollup |
📌 Commit 9b9f677 has been approved by |
Thanks for your patience @fee1-dead @compiler-errors 👍 |
Rollup of 6 pull requests Successful merges: - rust-lang#93217 (Improve Rustdoc UI for scraped examples with multiline arguments, fix overflow in line numbers) - rust-lang#95885 (Improve error message in case of missing checksum) - rust-lang#95962 (Document that DirEntry holds the directory open) - rust-lang#95991 (fix: wrong trait import suggestion for T:) - rust-lang#96005 (Add missing article to fix "few" to "a few".) - rust-lang#96006 (Add a missing article) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The suggestion to bound
T
had an extra:
.Fixes: #95898