Skip to content

Fix find_attr hygiene and rustc_hir cleanups#159893

Open
mejrs wants to merge 4 commits into
rust-lang:mainfrom
mejrs:find_attr_hygiene
Open

Fix find_attr hygiene and rustc_hir cleanups#159893
mejrs wants to merge 4 commits into
rust-lang:mainfrom
mejrs:find_attr_hygiene

Conversation

@mejrs

@mejrs mejrs commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

In particular, extern crate self as rustc_hir; leads to very noisy import suggestions if you get an import wrong. Also flatten the nested_filter module which seemed to exist just to avoid None / Option:None nameres conflicts

@rustbot

rustbot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

@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 Jul 25, 2026
@rustbot

rustbot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

r? @nnethercote

rustbot has assigned @nnethercote.
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 16 candidates

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

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 Jul 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit beddeb0 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 Jul 25, 2026
@rust-log-analyzer

This comment has been minimized.

@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 25, 2026
@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

⚠️ A new commit b89722c4285f3910bcbe54d9bdd461972a8ed545 was pushed.

This pull request was unapproved.

@mejrs

mejrs commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Pushed some additional small commits (not just fix to doclinks)

@rust-log-analyzer

This comment has been minimized.

@mejrs mejrs changed the title Fix find_attr hygiene and remove extern crate self as rustc_hir; Fix find_attr hygiene and rustc_hir cleanups Jul 25, 2026
@mejrs
mejrs force-pushed the find_attr_hygiene branch from b89722c to b41588f Compare July 25, 2026 12:12
@rustbot

rustbot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jul 25, 2026
@mejrs

mejrs commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@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 25, 2026

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems reasonable still
@bors r+ rollup

View changes since this review

@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b41588f has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

Reason for tree closure: spurious failures

@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 25, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 25, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 25, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
chenyukang added a commit to chenyukang/rust that referenced this pull request Jul 26, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
chenyukang added a commit to chenyukang/rust that referenced this pull request Jul 26, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
chenyukang added a commit to chenyukang/rust that referenced this pull request Jul 26, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 26, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 26, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
rust-bors Bot pushed a commit that referenced this pull request Jul 26, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #159638 (bootstrap: Split the `Step` trait into multiple traits)
 - #159774 (rustc_trait_selection: fix trait solver hang caused by degenerate obligations)
 - #159837 (line-tables-only test: check that the line number matches the function name)
 - #159946 (Update Enzyme submodule to imporve llvm-cov)
 - #159617 (Fix up `#[linkage]` target checking)
 - #159733 (std: Switch implementations of `thread_local!` for WASI)
 - #159783 (Check unsafe impls on safe EIIs)
 - #159810 (Add tuple never coercion collection regression test)
 - #159821 (Update expect message using the recommended style in binary_heap module)
 - #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
 - #159846 (Implement `str::copy_from_str`)
 - #159849 (rustc_parse: Stop returning `Option` from statement parsing)
 - #159853 (Updated expect messages for `CString` struct and method documentation)
 - #159875 (More cleanup in `rustc_attr_parsing`)
 - #159882 (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide)
 - #159891 (Split multiline derives into std/rustc macros)
 - #159893 (Fix `find_attr` hygiene and `rustc_hir` cleanups)
 - #159895 (rustc-dev-guide subtree update)
 - #159902 (Clarify that the expected runtime symbols signature is for the current target only)
 - #159914 (Fix error in diagnostic on_unmatched_args)
 - #159917 (spare capacity mut constification)
 - #159918 (rename abort_unwind → abort_on_unwind)
 - #159936 (Minor `rustc_ast::ast` doc cleanups)
 - #159945 (Update expect messages in library/core/src/ptr/non_null.rs)
rust-bors Bot pushed a commit that referenced this pull request Jul 26, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #159638 (bootstrap: Split the `Step` trait into multiple traits)
 - #159774 (rustc_trait_selection: fix trait solver hang caused by degenerate obligations)
 - #159837 (line-tables-only test: check that the line number matches the function name)
 - #159946 (Update Enzyme submodule to imporve llvm-cov)
 - #159617 (Fix up `#[linkage]` target checking)
 - #159733 (std: Switch implementations of `thread_local!` for WASI)
 - #159783 (Check unsafe impls on safe EIIs)
 - #159810 (Add tuple never coercion collection regression test)
 - #159821 (Update expect message using the recommended style in binary_heap module)
 - #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
 - #159846 (Implement `str::copy_from_str`)
 - #159849 (rustc_parse: Stop returning `Option` from statement parsing)
 - #159853 (Updated expect messages for `CString` struct and method documentation)
 - #159875 (More cleanup in `rustc_attr_parsing`)
 - #159882 (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide)
 - #159891 (Split multiline derives into std/rustc macros)
 - #159893 (Fix `find_attr` hygiene and `rustc_hir` cleanups)
 - #159895 (rustc-dev-guide subtree update)
 - #159902 (Clarify that the expected runtime symbols signature is for the current target only)
 - #159914 (Fix error in diagnostic on_unmatched_args)
 - #159917 (spare capacity mut constification)
 - #159918 (rename abort_unwind → abort_on_unwind)
 - #159936 (Minor `rustc_ast::ast` doc cleanups)
 - #159945 (Update expect messages in library/core/src/ptr/non_null.rs)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 26, 2026
…nBrouwer

Fix `find_attr` hygiene and `rustc_hir` cleanups

In particular, `extern crate self as rustc_hir;` leads to very noisy import suggestions if you get an import wrong. Also flatten the `nested_filter` module which seemed to exist just to avoid `None` / `Option:None` nameres conflicts
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.

5 participants