Skip to content

Add rustdoc-ui tests for (some) malformed doc attributes - #166246

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:malformed-doc-attrs
Nov 20, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:malformed-doc-attrs

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes #146346.

Which reminds me I should finish #165187...

r? @fmease

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 20, 2026
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 20, 2026

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

Thenks :)

It looks like we've previously placed attribute tests into rustdoc-ui/lints/. E.g.,

  • rustdoc-ui/lints/invalid-doc-attr{,-{2,3}}.rs
  • rustdoc-ui/lints/doc-attr{,-2}.rs

but then again, we also have

  • rustdoc-ui/invalid-attribute.rs
  • rustdoc-ui/check-doc-alias-attr{,-location}.rs
  • rustdoc-ui/deprecated-attrs.rs
  • rustdoc-ui/doc-attribute-unsupported.rs

(and rustdoc-ui/lints/check-attr.rs and rustdoc-ui/2024-doctests-crate-attribute.rs should belong into doctest/ instead since they concern code block attributes, not Rust attributes...)

What a mess. All tests exercising Rust attributes should belong into a new directory rustdoc-ui/attributes/ and have more consistent & descriptive names... but that's a different PR.

@bors r+ rollup force

View changes since this review

@rust-bors

rust-bors Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 64aa4be has been approved by fmease

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 Nov 20, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

I'm slowly cleaning up the tests/rustdoc* folders layout. I'm almost done with tests/rustdoc-html so I guess rustdoc-ui will be next.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 20, 2026
…, r=fmease

Add rustdoc-ui tests for (some) malformed doc attributes

Fixes rust-lang#146346.

Which reminds me I should finish rust-lang#165187...

r? @fmease
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #157721 (compiletest: Add testing for lint machinery at runtime)
 - #153746 (rustdoc: add emoji icons for unstable and deprecated to search results)
 - #164378 (RISC-V: enable relax target feature by default)
 - #166241 (view-types: better documentation for View variant)
 - #166246 (Add rustdoc-ui tests for (some) malformed doc attributes)
@rust-bors
rust-bors Bot merged commit 7b663f9 into rust-lang:main Nov 20, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup merge of #166246 - GuillaumeGomez:malformed-doc-attrs, r=fmease

Add rustdoc-ui tests for (some) malformed doc attributes

Fixes #146346.

Which reminds me I should finish #165187...

r? @fmease
@GuillaumeGomez
GuillaumeGomez deleted the malformed-doc-attrs branch November 20, 2026 16:58
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 22, 2026
… r=fmease

Move `rustdoc-ui` tests in the right folder

Since you mentioned it [here](rust-lang#166246 (review)) that we should cleanup this folder too, here you go @fmease. ;)

r? @fmease
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 23, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#157721 (compiletest: Add testing for lint machinery at runtime)
 - rust-lang/rust#153746 (rustdoc: add emoji icons for unstable and deprecated to search results)
 - rust-lang/rust#164378 (RISC-V: enable relax target feature by default)
 - rust-lang/rust#166241 (view-types: better documentation for View variant)
 - rust-lang/rust#166246 (Add rustdoc-ui tests for (some) malformed doc attributes)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
… r=fmease

Move `rustdoc-ui` tests in the right folder

Since you mentioned it [here](rust-lang#166246 (review)) that we should cleanup this folder too, here you go @fmease. ;)

r? @fmease
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-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.

rustdoc: Various #[doc] attributes are not fully validated (e.g., #[doc(hidden)], #[doc(no_inline)])

3 participants