Skip to content

Conversation

J-ZhengLi
Copy link
Member

@J-ZhengLi J-ZhengLi commented Apr 12, 2024

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 12, 2024
Comment on lines +602 to +612
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
Copy link
Member

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

@Alexendoo Alexendoo added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 9, 2024
@xFrednet
Copy link
Contributor

xFrednet commented Aug 3, 2024

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 r? clippy.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Aug 3, 2024
@Alexendoo
Copy link
Member

I believe #12672 (comment) still applies here

@xFrednet
Copy link
Contributor

xFrednet commented Aug 3, 2024

Okay, then a ping to @J-ZhengLi, have you seen the referenced comment?

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 3, 2024
@J-ZhengLi
Copy link
Member Author

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.

@xFrednet
Copy link
Contributor

Yeah, no problem, IRL stuff comes first! :D

@J-ZhengLi
Copy link
Member Author

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~

@J-ZhengLi J-ZhengLi closed this Oct 15, 2024
@xFrednet xFrednet added S-inactive-closed Status: Closed due to inactivity and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Oct 15, 2024
@profetia
Copy link
Contributor

Hi forks, I would like to continue this work. Looks like it ain't much left.

github-merge-queue bot pushed a commit that referenced this pull request Mar 1, 2025
fixes #11709

Continuation of #12672. r? @Alexendoo if you don't mind?

changelog: [`undocumented_unsafe_blocks`] fix FP on trait/impl items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive-closed Status: Closed due to inactivity
Projects
None yet
5 participants