Skip to content

Remove various superfluous lint attributes - #160085

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
mejrs:bye_lints
Jul 31, 2026
Merged

Remove various superfluous lint attributes#160085
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
mejrs:bye_lints

Conversation

@mejrs

@mejrs mejrs commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@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

@rustbot

rustbot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@mejrs

mejrs commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-aarch64-linux

@mejrs

mejrs commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-aarch64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Remove various superfluous lint attributes


try-job: dist-aarch64-linux
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f560859 (f560859bbd862a9afcdb458704fb47c4bdba4da0)
Base parent: ce69831 (ce6983167791bf9418726264f8e5cc7abf73d69b)

@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 (such as code changes or more information) from the author. labels Jul 31, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors r=JonathanBrouwer,mu001999 rollup

@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9a17150 has been approved by JonathanBrouwer,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 31, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 31, 2026
…,mu001999

Remove various superfluous lint attributes
@mejrs

mejrs commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@JonathanBrouwer did you actually review it? the changes to the PR are slightly more than just to fix the CI failure

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Yes I read the entire diff of the PR :)

@mejrs

mejrs commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Okay thanks, just making sure since I wasn't super obvious about it.

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Yeah can't hurt, thanks for checking!

@mu001999

Copy link
Copy Markdown
Member

Should we do a perf run?

@JonathanBrouwer

JonathanBrouwer commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Changing from HashMap to IndexMap could theoretically affect the time it takes for rustc to compile itself as they might be slightly slower, but it should not be possible for it to affect rust-timer benchmarks since it runs fully in macros and the results are the same.

I think it's unlikely the change in compiletime is measurable tho. Is there a reliable way to measure this compiletime? Job duration is definitely too noisy

@mu001999

Copy link
Copy Markdown
Member

Oh it's in rustc_macros :)

@JonathanBrouwer JonathanBrouwer self-assigned this Jul 31, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 31, 2026
…,mu001999

Remove various superfluous lint attributes
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 31, 2026
…,mu001999

Remove various superfluous lint attributes
rust-bors Bot pushed a commit that referenced this pull request Jul 31, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #160100 (Add "system" option to `override-allocator` directive)
 - #159675 (rustc: Support `--jobs` options for limiting parallelism in various parts of the compiler)
 - #159999 (Fix invalidation of stdlib in bootstrap when using non-LLVM codegen backends)
 - #160233 (Bubble bad path error while parsing field to avoid unecessary second error)
 - #160272 (rustc_metadata: Move native library search code to `rustc_codegen_ssa`)
 - #154202 (rustfmt: Format `cfg_select!`)
 - #158835 (rustc_passes: lint unused `#[path]` attributes on inline modules)
 - #159520 (Suggest `Vec<T>` instead of `[T]`)
 - #160034 (Move "macro only" check for `#[allow_internal_unsafe/unstable]` to attribute parser)
 - #160066 (rustc_middle: lint attribute cleanups)
 - #160085 (Remove various superfluous lint attributes)
 - #160113 (Coalesce `rustc_on_unimplemented` attributes and lint malformed filters)
 - #160119 (fix query cycle in `coroutine_hidden_types` for the next solver)
 - #160147 (tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`)
 - #160157 (Remove outdated comments from `va_list.rs`)
 - #160159 (More accurately check for interior mutability in `invalid_reference_casting` lint)
 - #160208 (rustdoc: Fix crash when trying to list attributes on an opaque type)
 - #160244 (Rename splat to rustc_splat in error messages)
 - #160246 (dont fire `unused_mut` on `&pin mut self`)
 - #160247 (Configure backport nominations for rustfmt)
 - #160274 (renovate: update lock files weekly)
rust-bors Bot pushed a commit that referenced this pull request Jul 31, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #160100 (Add "system" option to `override-allocator` directive)
 - #160220 (Refactor: shrink region ext traits)
 - #159675 (rustc: Support `--jobs` options for limiting parallelism in various parts of the compiler)
 - #159999 (Fix invalidation of stdlib in bootstrap when using non-LLVM codegen backends)
 - #160233 (Bubble bad path error while parsing field to avoid unecessary second error)
 - #160272 (rustc_metadata: Move native library search code to `rustc_codegen_ssa`)
 - #154202 (rustfmt: Format `cfg_select!`)
 - #159520 (Suggest `Vec<T>` instead of `[T]`)
 - #159710 (Add rustdoc/cargo PGO profiles to reproducible artifacts)
 - #160034 (Move "macro only" check for `#[allow_internal_unsafe/unstable]` to attribute parser)
 - #160066 (rustc_middle: lint attribute cleanups)
 - #160085 (Remove various superfluous lint attributes)
 - #160113 (Coalesce `rustc_on_unimplemented` attributes and lint malformed filters)
 - #160119 (fix query cycle in `coroutine_hidden_types` for the next solver)
 - #160147 (tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`)
 - #160157 (Remove outdated comments from `va_list.rs`)
 - #160159 (More accurately check for interior mutability in `invalid_reference_casting` lint)
 - #160208 (rustdoc: Fix crash when trying to list attributes on an opaque type)
 - #160244 (Rename splat to rustc_splat in error messages)
 - #160246 (dont fire `unused_mut` on `&pin mut self`)
 - #160247 (Configure backport nominations for rustfmt)
 - #160274 (renovate: update lock files weekly)
@rust-bors
rust-bors Bot merged commit a621f18 into rust-lang:main Jul 31, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 31, 2026
rust-timer added a commit that referenced this pull request Jul 31, 2026
Rollup merge of #160085 - mejrs:bye_lints, r=JonathanBrouwer,mu001999

Remove various superfluous lint attributes
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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