Skip to content

small refactor of doc attribute arguments warnings - #162099

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
mejrs:doc_values
Sep 11, 2026
Merged

small refactor of doc attribute arguments warnings#162099
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
mejrs:doc_values

Conversation

@mejrs

@mejrs mejrs commented Aug 31, 2026

Copy link
Copy Markdown
Member

No description provided.

@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

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 Aug 31, 2026
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 31, 2026
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

r? @mati865

rustbot has assigned @mati865.
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 75 candidates
  • Random selection from 17 candidates

);
}
ArgParser::List(items) => {
ArgParser::List(items) if !items.is_empty() => {

@JonathanBrouwer JonathanBrouwer Sep 1, 2026

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.

Hmmm I'm not sure how I feel about a INVALID_DOC_ATTRIBUTES on #[doc()], could you motivate this change?

I think UNUSED_ATTRIBUTES might be nicer.
Other attributes, such as #[repr()], #![feature()] also do this.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

#[doc], #[doc(bogus)] etc emit invalid_doc_attributes. I think #[doc()] fits right in.

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.

I guess I just don't like that INVALID_DOC_ATTRIBUTES exists at all, but it does so indeed it does fit in

@rustbot rustbot 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 Sep 1, 2026
@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 Sep 2, 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 Sep 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 25e99b2 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 Sep 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 11, 2026
small refactor of doc attribute arguments warnings
rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #162126 (Rename various resolving functions for consistency, and document them)
 - #162520 (Refactor `HygieneEncodeContext`)
 - #154373 (Skip linting unused braces for FunctionArg and MethodArg context for 2024 later )
 - #160023 (Refactor the way cg_ssa handles indirect returns (returns via `sret`) — Take 2)
 - #161482 (Use attribute parser for `#[non_exhaustive]` attribute check)
 - #161867 (deeper `rustc_builtin_macros` cleanups)
 - #162099 (small refactor of doc attribute arguments warnings)
 - #162541 (split `macroless_generic_const_args` in two)
 - #162549 (The fuchsia team maintains `riscv64gc-unknown-fuchsia`)
 - #162577 (Fix `i686-pc-windows-msvc` platform support docs and target spec metadata)
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 11, 2026
small refactor of doc attribute arguments warnings
rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #162520 (Refactor `HygieneEncodeContext`)
 - #154373 (Skip linting unused braces for FunctionArg and MethodArg context for 2024 later )
 - #160023 (Refactor the way cg_ssa handles indirect returns (returns via `sret`) — Take 2)
 - #160860 (Implement arbitrary casts in custom mir)
 - #161482 (Use attribute parser for `#[non_exhaustive]` attribute check)
 - #161867 (deeper `rustc_builtin_macros` cleanups)
 - #162099 (small refactor of doc attribute arguments warnings)
 - #162541 (split `macroless_generic_const_args` in two)
 - #162549 (The fuchsia team maintains `riscv64gc-unknown-fuchsia`)
 - #162577 (Fix `i686-pc-windows-msvc` platform support docs and target spec metadata)
 - #162624 (regression test for opaque field projection in closure capture)
@rust-bors
rust-bors Bot merged commit 5c8e527 into rust-lang:main Sep 11, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
Rollup merge of #162099 - mejrs:doc_values, r=JonathanBrouwer

small refactor of doc attribute arguments warnings
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (0e0356e): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: missing data
Artifact size: 407.63 MiB -> 406.94 MiB (-0.17%)

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-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.

5 participants