-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Dont suggest use between use
and cfg attr
#115630
Dont suggest use between use
and cfg attr
#115630
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
db876d1
to
84e8b3f
Compare
84e8b3f
to
03bee1f
Compare
Thanks @compiler-errors! 🎉 @bors r+ rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#113807 (Tests crash from inappropriate use of common linkage) - rust-lang#115358 (debuginfo: add compiler option to allow compressed debuginfo sections) - rust-lang#115630 (Dont suggest use between `use` and cfg attr) - rust-lang#115662 (Improve "associated type not found" diagnostics) - rust-lang#115673 (Fix sanitize/cfg.rs test) r? `@ghost` `@rustbot` modify labels: rollup
return Some(item.span.shrink_to_lo()); | ||
let mut lo = item.span.lo(); | ||
for attr in &item.attrs { | ||
if attr.span.eq_ctxt(item.span) { | ||
lo = std::cmp::min(lo, attr.span.lo()); | ||
} | ||
} | ||
return Some(Span::new(lo, lo, item.span.ctxt(), item.span.parent())); |
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.
Should this use item.span_with_attributes().lo()
?
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.
Didn't know we even had that.
Rollup merge of rust-lang#115630 - compiler-errors:dont-suggest-use-btw-use-and-attr, r=wesleywiser Dont suggest use between `use` and cfg attr Fixes rust-lang#115618
Fixes #115618