Skip to content

Comments

Fix attribute parser and kind names.#153032

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
nnethercote:fix-attribute-names
Feb 25, 2026
Merged

Fix attribute parser and kind names.#153032
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
nnethercote:fix-attribute-names

Conversation

@nnethercote
Copy link
Contributor

For the attribute FooBar the parser is generally called FooBarParser and the kind is called AttributeKind::FooBar. This commit renames some cases that don't match that pattern. The most common cases:

  • Adding Rustc to the front of the parser name for a rustc_* attribute.
  • Adding Parser to the end of a parser name.
  • Slight word variations, e.g. Deprecation instead of Deprecated, Pointer instead of Ptr, Stability instead of Stable.

r? @JonathanBrouwer

@rustbot
Copy link
Collaborator

rustbot commented Feb 24, 2026

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

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 24, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 24, 2026

JonathanBrouwer is currently at their maximum review capacity.
They may take a while to respond.

Copy link
Contributor

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

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

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 24, 2026

📌 Commit 092d4fb 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 Feb 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 24, 2026
…=JonathanBrouwer

Fix attribute parser and kind names.

For the attribute `FooBar` the parser is generally called `FooBarParser` and the kind is called `AttributeKind::FooBar`. This commit renames some cases that don't match that pattern. The most common cases:
- Adding `Rustc` to the front of the parser name for a `rustc_*` attribute.
- Adding `Parser` to the end of a parser name.
- Slight word variations, e.g. `Deprecation` instead of `Deprecated`, `Pointer` instead of `Ptr`, `Stability` instead of `Stable`.

r? @JonathanBrouwer
rust-bors bot pushed a commit that referenced this pull request Feb 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #152176 (Neon fast path for str::contains)
 - #152657 (std: move `exit` out of PAL)
 - #152841 (Streamline `QueryVTableUnerased` into `GetQueryVTable`)
 - #152845 (Skip `tidy` in PR CI jobs not dedicated to running `tidy`)
 - #152897 (Add optional json logging)
 - #153009 (Remove `rustc_feedable_queries` and `define_feedable` macros.)
 - #151558 (Port diagnostic attributes)
 - #152492 (mGCA: Enforce WF element types for array valtrees)
 - #152888 (Fix async drop glue MIR bug)
 - #152988 (Port `#[register_tool]` to the new attribute system)
 - #153018 (`unused_must_use` lint improvements)
 - #153023 (Update books)
 - #153033 (Clarify how "ensure" queries check whether they can skip execution)
 - #153043 (fix error on missing value for -C flags)
 - #153045 (rustc-dev-guide subtree update)

Failed merges:

 - #153032 (Fix attribute parser and kind names.)
@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 Feb 24, 2026
@rust-bors

This comment has been minimized.

For the attribute `FooBar` the parser is generally called `FooBarParser`
and the kind is called `AttributeKind::FooBar`. This commit renames some
cases that don't match that pattern. The most common cases:
- Adding `Rustc` to the front of the parser name for a `rustc_*`
  attribute.
- Adding `Parser` to the end of a parser name.
- Slight word variations, e.g. `Deprecation` instead of `Deprecated`,
  `Pointer` instead of `Ptr`, `Stability` instead of `Stable`.
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@nnethercote
Copy link
Contributor Author

I rebased.

@bors r=JonathanBrouwer

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 25, 2026

📌 Commit 8971ad8 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 25, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 25, 2026
Rollup of 12 pull requests

Successful merges:

 - #149169 (ptr::replace: make calls on ZST null ptr not UB)
 - #150562 (Fix doc link used in suggestion for pinning self)
 - #152418 (`BTreeMap::merge` optimized)
 - #152679 (rustc_expand: improve diagnostics for non-repeatable metavars)
 - #152952 (mGCA: improve ogca diagnostic message )
 - #152977 (Fix relative path handling for --extern-html-root-url)
 - #153017 (Implement debuginfo for unsafe binder types)
 - #152868 (delete some very old trivial `Box` tests)
 - #152922 (rustc_public: Make fields that shouldn't be exposed visible only in `rustc_public`)
 - #153032 (Fix attribute parser and kind names.)
 - #153051 (Migration of `LintDiagnostic` - part 3)
 - #153060 (Give a better error when updating a submodule fails)
@rust-bors rust-bors bot merged commit 9765a8b into rust-lang:main Feb 25, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 25, 2026
rust-timer added a commit that referenced this pull request Feb 25, 2026
Rollup merge of #153032 - nnethercote:fix-attribute-names, r=JonathanBrouwer

Fix attribute parser and kind names.

For the attribute `FooBar` the parser is generally called `FooBarParser` and the kind is called `AttributeKind::FooBar`. This commit renames some cases that don't match that pattern. The most common cases:
- Adding `Rustc` to the front of the parser name for a `rustc_*` attribute.
- Adding `Parser` to the end of a parser name.
- Slight word variations, e.g. `Deprecation` instead of `Deprecated`, `Pointer` instead of `Ptr`, `Stability` instead of `Stable`.

r? @JonathanBrouwer
@nnethercote nnethercote deleted the fix-attribute-names branch February 25, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc 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