Skip to content

Cleanup unused diagnostic emission methods#153452

Merged
rust-bors[bot] merged 11 commits intorust-lang:mainfrom
GuillaumeGomez:migrate-diag
Mar 6, 2026
Merged

Cleanup unused diagnostic emission methods#153452
rust-bors[bot] merged 11 commits intorust-lang:mainfrom
GuillaumeGomez:migrate-diag

Conversation

@GuillaumeGomez
Copy link
Member

Part of #153099.

To remove lint_level, we need to remove all functions calling it. One of them is TyCtxt::node_span_lint, so removing it.

r? @JonathanBrouwer

@rustbot
Copy link
Collaborator

rustbot commented Mar 5, 2026

HIR ty lowering was modified

cc @fmease

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Mar 5, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 5, 2026

JonathanBrouwer is currently at their maximum review capacity.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot 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 Mar 5, 2026
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Mar 5, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Mar 5, 2026
@GuillaumeGomez
Copy link
Member Author

PR is not ready, we need to figure out why the tracking is currently broken in clippy:

--- tests/ui/track-diagnostics-clippy.stderr
+++ <stderr output>
 error: casting to the same type is unnecessary (`u32` -> `u32`)
   --> tests/ui/track-diagnostics-clippy.rs:LL:CC
... 2 lines skipped ...
    |             ^^^^^^^^ help: try: `a`
    |
-   = note: -Ztrack-diagnostics: created at clippy_lints/src/casts/unnecessary_cast.rs:LL:CC
+   = note: -Ztrack-diagnostics: created at compiler/rustc_middle/src/lint.rs:LL:CC
    = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
... 18 lines skipped ...
 error: aborting due to 2 previous errors

You can run this (specific) test with:

TESTNAME=track-diagnostics-clippy ./x.py test src/tools/clippy/ --stage 1

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor

r=me if ci green & you agree with my commit

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

@bors r=JonathanBrouwer rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 6, 2026

📌 Commit e01a7e7 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 6, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 6, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #153466 (`rust-analyzer` subtree update)
 - #151280 (Fix incorrect trailing comma suggested in no_accessible_fields)
 - #152593 (Box in `ValTreeKind::Branch(Box<[I::Const]>)` changed to `List`)
 - #153174 (std: add wasm64 to sync::Once and thread_parking atomics cfg guards)
 - #153485 (libcore float tests: replace macro shadowing by const-compatible macro)
 - #153495 (Fix ICE in `offset_of!` error recovery)
 - #152040 (Do not emit ConstEvaluatable goals if type-const)
 - #152741 (Suppress invalid suggestions in destructuring assignment)
 - #153189 (refactor: move `check_align` to `parse_alignment`)
 - #153230 (Roll rustfmt reviewers for in-tree rustfmt)
 - #153445 (Consider try blocks as block-like for overflowed expr)
 - #153452 (Cleanup unused diagnostic emission methods)
 - #153476 (bootstrap.py: fix typo "parallle")
 - #153483 (Preserve parentheses around `Fn` trait bounds in pretty printer)
@rust-bors rust-bors bot merged commit 69dc318 into rust-lang:main Mar 6, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 6, 2026
rust-timer added a commit that referenced this pull request Mar 6, 2026
Rollup merge of #153452 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer

Cleanup unused diagnostic emission methods

Part of #153099.

To remove `lint_level`, we need to remove all functions calling it. One of them is `TyCtxt::node_span_lint`, so removing it.

r? @JonathanBrouwer
@GuillaumeGomez GuillaumeGomez deleted the migrate-diag branch March 7, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. 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.

4 participants