Skip to content

Conversation

blyxyas
Copy link
Member

@blyxyas blyxyas commented Jul 23, 2025

Due to the complexity of the issue and the simplicity of the fix, I'm not being able to reproduce it in the tests (I'm not even being able to reproduce to issue to begin with), but testing it on upstream rust, the panic no longer occurs.

fixes #15338

changelog:[needless_return]: Do not run in proc macros.

@rustbot
Copy link
Collaborator

rustbot commented Jul 23, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 23, 2025
@samueltardieu
Copy link
Member

@blyxyas I can't reproduce the problem on the current rustc's master branch while running the full ./x clippy, even without your fix. Can you?

@rustbot
Copy link
Collaborator

rustbot commented Sep 13, 2025

☔ The latest upstream changes (possibly 1d0582a) made this pull request unmergeable. Please resolve the merge conflicts.

@y21
Copy link
Member

y21 commented Sep 13, 2025

In #13464 I did pretty much the same change as this PR, adding is_from_proc_macro to that function. It's a bit further down in a match arm, but as far as I can tell still on the same codepath to the emit_return_lint function where it supposedly ICEs.

So as far as I can tell, this change should have no effect, given that we now check from a proc macro twice? Or am I overlooking something?

@blyxyas blyxyas closed this Sep 14, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 14, 2025
@blyxyas
Copy link
Member Author

blyxyas commented Sep 14, 2025

Either the upstream rustc is fixed, or Clippy is fixed. If we don’t have a minimal repro and the suspect was fixed, I think that we can fix the upstream issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected panic in rustc_query_system while running 'x clippy'
5 participants