-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 [undocumented_unsafe_blocks
] FP with trait/impl items
#12672
Conversation
ace7a0a
to
6992351
Compare
for (_, parent_node) in cx.tcx.hir().parent_iter(body.hir_id) { | ||
match parent_node { | ||
Node::Crate(mod_) => return Some(mod_.spans.inner_span), | ||
node if let Some((span, _)) = span_and_hid_of_item_alike_node(&node) | ||
&& !is_const_or_static(&node) => | ||
{ | ||
return Some(span); | ||
}, | ||
Node::Crate(mod_) if maybe_global_var => { | ||
span = mod_.spans.inner_span; | ||
}, | ||
_ => break, | ||
_ => {}, | ||
} | ||
} | ||
Some(span) | ||
None |
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.
Is this correct for things in submodules? I think a static in a submodule (separate file) would get the span of mod foo;
rather than module's inner span
Hey, this is a ping from triage. @Alexendoo can you give this PR a review? It's totally fine if you don't have the time right now, you can reassign the PR to a random team member using @rustbot ready |
I believe #12672 (comment) still applies here |
Okay, then a ping to @J-ZhengLi, have you seen the referenced comment? @rustbot author |
Ahh yes, sorry I have some time sensitive task for my job lately, is it ok if I left this PR hang for 2 more weeks? I should have more time at the end of August, so I can finally got back to clippy by then :D. |
Yeah, no problem, IRL stuff comes first! :D |
I think IRL stuff has drained all my energy away... sad, I thought it'd be over in September, but well.... anyway, closing this for now, if someone want to continue working on it, that will be wonderful~ |
Hi forks, I would like to continue this work. Looks like it ain't much left. |
fixes: #11709
close: #12720
do-over of #11813 , I was trying to fix multiple problems at once thus making that PR hard to review, also hard to maintain after so many conflicts... So, here's a new one, should be a bit simpler to review the changes.
r? @Alexendoo if you don't mind?
changelog: fix [
undocumented_unsafe_blocks
] FP with trait/impl items