Skip to content

Add #[rust_analyzer::prefer_underscore_import] to the traits in rustc_type_ir::inherent#155541

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
ChayimFriedman2:import-underscore
Apr 20, 2026
Merged

Add #[rust_analyzer::prefer_underscore_import] to the traits in rustc_type_ir::inherent#155541
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
ChayimFriedman2:import-underscore

Conversation

@ChayimFriedman2
Copy link
Copy Markdown
Contributor

This is a new attribute (rust-lang/rust-analyzer#21740) that instructs rust-analyzer to prefer importing the trait as _. It is useful for these traits since their names often clashes with the type.

…stc_type_ir::inherent`

This is a new attribute that instructs rust-analyzer to prefer importing the trait `as _`. It is useful for these traits
since their names often clashes with the type.
@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 Apr 20, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 20, 2026

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
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, types
  • compiler, types expanded to 72 candidates
  • Random selection from 16 candidates

@TaKO8Ki
Copy link
Copy Markdown
Member

TaKO8Ki commented Apr 20, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 20, 2026

📌 Commit 592c815 has been approved by TaKO8Ki

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 Apr 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 20, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #154654 (Move `std::io::ErrorKind` to `core::io`)
 - #145270 (Fix an ICE observed with an explicit tail-call in a default trait method)
 - #154895 (borrowck: Apply `user_arg_index` nomenclature more broadly)
 - #155213 (resolve: Make sure visibilities of import declarations make sense)
 - #155346 (`single_use_lifetimes`: respect `anonymous_lifetime_in_impl_trait`)
 - #155517 (Add a test for Mach-O `#[link_section]` API inherited from LLVM)
 - #155549 (Remove some unnecessary lifetimes.)
 - #154248 (resolve :  mark repr_simd as internal)
 - #154772 (slightly optimize the `non-camel-case-types` lint)
 - #155541 (Add `#[rust_analyzer::prefer_underscore_import]` to the traits in `rustc_type_ir::inherent`)
 - #155544 (bootstrap: Make "detected modifications" for download-rustc less verbose)
@rust-bors rust-bors Bot merged commit 26f457a into rust-lang:main Apr 20, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 20, 2026
@ChayimFriedman2 ChayimFriedman2 deleted the import-underscore branch April 20, 2026 19:50
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 21, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#154654 (Move `std::io::ErrorKind` to `core::io`)
 - rust-lang/rust#145270 (Fix an ICE observed with an explicit tail-call in a default trait method)
 - rust-lang/rust#154895 (borrowck: Apply `user_arg_index` nomenclature more broadly)
 - rust-lang/rust#155213 (resolve: Make sure visibilities of import declarations make sense)
 - rust-lang/rust#155346 (`single_use_lifetimes`: respect `anonymous_lifetime_in_impl_trait`)
 - rust-lang/rust#155517 (Add a test for Mach-O `#[link_section]` API inherited from LLVM)
 - rust-lang/rust#155549 (Remove some unnecessary lifetimes.)
 - rust-lang/rust#154248 (resolve :  mark repr_simd as internal)
 - rust-lang/rust#154772 (slightly optimize the `non-camel-case-types` lint)
 - rust-lang/rust#155541 (Add `#[rust_analyzer::prefer_underscore_import]` to the traits in `rustc_type_ir::inherent`)
 - rust-lang/rust#155544 (bootstrap: Make "detected modifications" for download-rustc less verbose)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants