Skip to content

function_item_references: don't ICE when not emitted - #162210

Open
GrigorenkoPV wants to merge 3 commits into
rust-lang:mainfrom
GrigorenkoPV:fn-item-ref
Open

GrigorenkoPV wants to merge 3 commits into
rust-lang:mainfrom
GrigorenkoPV:fn-item-ref

Conversation

@GrigorenkoPV

@GrigorenkoPV GrigorenkoPV commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

The classical case of formatting stuff too early. I wonder how many other lints like that we currently have.

Fixes #162107

No LLMs used

@rustbot

rustbot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 2, 2026
@rustbot

rustbot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 21 candidates

@mejrs

mejrs commented Sep 6, 2026

Copy link
Copy Markdown
Member

Can you figure out where the trimmed_def_paths call is coming from? I don't see being removed in the diff. It's possible it's hidden deep in a Display impl somewhere. As you say, this might be happening with other lints, so it would be nice to audit its use.

Also this PR also makes changes to the output that aren't really needed. You can usually leave the parameters and return types inferred here, i.e. do ... as fn(_, _) => _, no need to write full names. I'm not sure about this

(fwiw, another possible approach here is to check lint_level_spec_at_node, and not bother formatting stuff if it's allowed anyway)

@mejrs mejrs added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rustc] panicked at compiler/rustc_errors/src/lib.rs

3 participants