Skip to content

Remove various superfluous lint attributes - #160085

Open
mejrs wants to merge 1 commit into
rust-lang:mainfrom
mejrs:bye_lints
Open

Remove various superfluous lint attributes#160085
mejrs wants to merge 1 commit into
rust-lang:mainfrom
mejrs:bye_lints

Conversation

@mejrs

@mejrs mejrs commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot

rustbot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

rustc_macros::diagnostics was changed

cc @TaKO8Ki, @JonathanBrouwer

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Jul 28, 2026
@rustbot

rustbot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

r? @mu001999

rustbot has assigned @mu001999.
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 74 candidates
  • Random selection from 15 candidates

// Unlike all the other GC helpers where we check if an `AllocId` is found in the interpreter or
// is live, here all the IDs in the map are for dead allocations so we don't
// need to check for liveness.
#[allow(rustc::potential_query_instability)] // Only used from Miri, not queries.

@mejrs mejrs Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was missed in #120931

View changes since the review

@mu001999

Copy link
Copy Markdown
Member

Nice cleanup! r=me after CI green

@mu001999

Copy link
Copy Markdown
Member

By the way, I'm wondering how you found these to be superfluous

@mejrs

mejrs commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

By the way, I'm wondering how you found these to be superfluous

You start removing random allows and see whether something starts screaming at you 😜

Comment on lines -5 to -7
// tidy-alphabetical-start
#![allow(unused_crate_dependencies)]
// tidy-alphabetical-end

@Nadrieril Nadrieril Jul 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is a librarified crate that may be compiled without the rustc feature. But I guess that flag is allowed by default in a normal compilation so maybe that's not relevant? I'm just wondering why it was there in the first place

View changes since the review

@mu001999 mu001999 Jul 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like CI fails due to this.

@mejrs mejrs Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added with the implementation of rust-lang/compiler-team#844, why I do not know. Sometimes with those cleanup prs it's preferable to add an allow here and there to avoid expanding the scope of the pr too much

and this is why:

  warning: extern crate `tracing_subscriber` is unused in crate `rustc_pattern_analysis`
    |
    = help: remove the dependency or add `use tracing_subscriber as _;` to the crate root
    = note: requested on the command line with `-W unused-crate-dependencies`
  
  warning: extern crate `tracing_tree` is unused in crate `rustc_pattern_analysis`
    |
    = help: remove the dependency or add `use tracing_tree as _;` to the crate root

@Nadrieril Nadrieril Jul 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, seems like this was added because of a false positive when compiling the compiler. So it used to trigger, and seems like it doesn't anymore, so it should be fine to remove. The only commit that vaguely could affect this since then is 67c6cd9 maybe? I'm ok with removing it at least.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, y'all were so fast :D If it's these crates it's because they're used in tests. But they're explicitly used, idk why they'd trigger the warning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're only used in integration tests (not unit tests), that's probably why. I'll try to figure something out or back it out and add a comment.

@rust-log-analyzer

This comment has been minimized.

@mu001999

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6db37c2 has been approved by mu001999

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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 29, 2026
Remove various superfluous lint attributes
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 29, 2026
Remove various superfluous lint attributes
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 6 pull requests

Successful merges:

 - #158460 (Remove llvm_enzyme feature outside of bootstrap)
 - #159671 (Add semver check test command for checking API compatibility of stdlib)
 - #159717 (Add `-Zimplicit-sysroot-deps`)
 - #159994 (Show jobs where a given test was executed in `test-dashboard`)
 - #160085 (Remove various superfluous lint attributes)
 - #160123 (add additional license option for third-party dependencies)
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #160135 (comment)

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 29, 2026
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#160135), which was unapproved.

View changes since this unapproval

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

Labels

A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.

6 participants