-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
htmldocck: Don't silently ignore !@has comments #80570
Copy link
Copy link
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently, htmldocck (the script that runs
src/test/rustdoctests) has twoprimary test assertions:
@hasand@!has.@haschecks for the presence oftext in tags selected with an XPath selector.
@!hasdoes the same, except itchecks for the absence of text. However, it is very easy to write
!@hasinstead of
@!hasby mistake (see #80565 for an example of some tests that used!@hasand had to be fixed), but!@haswill be silently ignored by htmldocck.Instead, htmldocck should either accept
!@hasor error out and cause the testto fail. Otherwise, it's confusing to people who are new to htmldocck and, even
worse, we will likely end up with tests that have silently-ignored assertions.
cc @GuillaumeGomez