Skip to content

Change ItemKind::Trait to a field variant.#155702

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mejrs:itemkind_trait-fields
Apr 28, 2026
Merged

Change ItemKind::Trait to a field variant.#155702
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mejrs:itemkind_trait-fields

Conversation

@mejrs
Copy link
Copy Markdown
Contributor

@mejrs mejrs commented Apr 23, 2026

This changes ItemKind::Trait from an octuple(!!) to an enum variant with fields. Their names were chosen to match up with existing usage and minimize renaming.

I'm leaning towards renaming ident to name as well; let me know if that's desired.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

r? @petrochenkov

rustbot has assigned @petrochenkov.
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 73 candidates
  • Random selection from 18 candidates

Comment thread compiler/rustc_ast/src/ast.rs Outdated
Comment thread compiler/rustc_hir/src/hir.rs Outdated
@petrochenkov
Copy link
Copy Markdown
Contributor

I'm leaning towards renaming ident to name as well; let me know if that's desired.

Typically ident is Ident and name is Symbol, so the current naming is good.

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2026
@mejrs mejrs force-pushed the itemkind_trait-fields branch from e4824a5 to 9515f52 Compare April 24, 2026 17:05
@mejrs mejrs 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 Apr 24, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 27, 2026

📌 Commit 9515f52 has been approved by petrochenkov

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 27, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 27, 2026
…rochenkov

Change `ItemKind::Trait` to a field variant.

This changes `ItemKind::Trait` from an octuple(!!) to an enum variant with fields. Their names were chosen to match up with existing usage and minimize renaming.

I'm leaning towards renaming `ident` to `name` as well; let me know if that's desired.
rust-bors Bot pushed a commit that referenced this pull request Apr 27, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #155760 (Remove `AttributeLintKind`)
 - #154510 (Partially stabilize LoongArch target features)
 - #155137 (Allow trailing `self` in more contexts)
 - #155433 (Rip out rustc_layout_scalar_valid_range_* attribute support)
 - #155702 (Change `ItemKind::Trait` to a field variant.)
 - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder)
 - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`)
 - #155874 (Avoid misleading closure return type note)
 - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
rust-bors Bot pushed a commit that referenced this pull request Apr 27, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #154510 (Partially stabilize LoongArch target features)
 - #155137 (Allow trailing `self` in more contexts)
 - #155513 (rustc_public: implement `Pattern` type)
 - #155702 (Change `ItemKind::Trait` to a field variant.)
 - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder)
 - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`)
 - #155874 (Avoid misleading closure return type note)
 - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
@rust-bors rust-bors Bot merged commit e8ad7f2 into rust-lang:main Apr 28, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 28, 2026
rust-timer added a commit that referenced this pull request Apr 28, 2026
Rollup merge of #155702 - mejrs:itemkind_trait-fields, r=petrochenkov

Change `ItemKind::Trait` to a field variant.

This changes `ItemKind::Trait` from an octuple(!!) to an enum variant with fields. Their names were chosen to match up with existing usage and minimize renaming.

I'm leaning towards renaming `ident` to `name` as well; let me know if that's desired.
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants