Skip to content

Remove unnecessary mut from HirIdValidator::check_nested_id - #165772

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
yassa-tamer:remove-unnecessary-mut
Nov 11, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
yassa-tamer:remove-unnecessary-mut

Conversation

@yassa-tamer

Copy link
Copy Markdown
Contributor

Remove unnecessary mut from HirIdValidator::check_nested_id, as this method doesn't need a mutated self. See #t-compiler/help > The check_nested_id in HirIdValidator doesn't need mut

The changes compile successfully and pass the ./x check compiler/rustc_passes check.

@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 Nov 10, 2026
@rustbot

rustbot commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @mu001999 (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

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

@teor2345 teor2345 left a comment •

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.

Trivial but seems fine to me. The &mut was probably copied from the trait, this code hasn't changed much in years.

(I can't merge this, so another reviewer will have a look and decide if this change is worth taking.)

View changes since this review

@teor2345 teor2345 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-HIR Area: The high-level intermediate representation (HIR) labels Nov 10, 2026

@JonathanBrouwer JonathanBrouwer left a comment •

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.

@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit e6d76cd 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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 10, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
Rollup of 9 pull requests

Successful merges:

 - #165117 (std: use skip_unsupported_miri_tests to control when tests should be skipped in Miri due to missing shims)
 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #165750 (Wrap proc-macro `EscapeError` enum into a struct)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
 - #165021 (In irrefutable patterns, the FieldPat is skipped, which means the name: field is not printed)
 - #165537 (Canonicalization cleanups)
 - #165772 (Remove unnecessary mut from HirIdValidator::check_nested_id)
 - #165779 (make improper_ctypes accept `x87_f80`)
 - #165780 (std: map more errno values to ErrorKind on Hermit)
@rust-bors
rust-bors Bot merged commit 348d71f into rust-lang:main Nov 11, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
Rollup merge of #165772 - yassa-tamer:remove-unnecessary-mut, r=JonathanBrouwer

Remove unnecessary mut from HirIdValidator::check_nested_id

Remove unnecessary `mut` from `HirIdValidator::check_nested_id`, as this method doesn't need a mutated self. See [#t-compiler/help > The check_nested_id in HirIdValidator  doesn't need mut](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/The.20check_nested_id.20in.20HirIdValidator.20.20doesn.27t.20need.20mut/with/639210467)

The changes compile successfully and pass the `./x check compiler/rustc_passes` check.
mehmettoplu-rs pushed a commit to mehmettoplu-rs/miri that referenced this pull request Nov 13, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#165117 (std: use skip_unsupported_miri_tests to control when tests should be skipped in Miri due to missing shims)
 - rust-lang/rust#165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - rust-lang/rust#165750 (Wrap proc-macro `EscapeError` enum into a struct)
 - rust-lang/rust#164218 (Tweak private re-export errors to point at correct span and have more context)
 - rust-lang/rust#165021 (In irrefutable patterns, the FieldPat is skipped, which means the name: field is not printed)
 - rust-lang/rust#165537 (Canonicalization cleanups)
 - rust-lang/rust#165772 (Remove unnecessary mut from HirIdValidator::check_nested_id)
 - rust-lang/rust#165779 (make improper_ctypes accept `x87_f80`)
 - rust-lang/rust#165780 (std: map more errno values to ErrorKind on Hermit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-HIR Area: The high-level intermediate representation (HIR) C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

5 participants