Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: Rename @has FILE PATTERN to @hastext #100354

Closed
camelid opened this issue Aug 10, 2022 · 1 comment · Fixed by #100355
Closed

rustdoc: Rename @has FILE PATTERN to @hastext #100354

camelid opened this issue Aug 10, 2022 · 1 comment · Fixed by #100355
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Aug 10, 2022

@has FILE PATTERN treats PATTERN as literal text, while @has FILE PATTERN ANOTHER_PATTERN treats PATTERN as an XPath (and ANOTHER_PATTERN as literal text). This is quite confusing and left me perplexed at why my test was failing. IMO we should have a different name for these two versions. The literal (arity-2) version could be named @hastext.

This would also rename the equivalent for @matches to @matchestext.

Originally posted by @camelid in #100348 (comment)

@camelid camelid added A-testsuite Area: The testsuite used to check the correctness of rustc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Aug 10, 2022
@camelid
Copy link
Member Author

camelid commented Aug 10, 2022

Currently @has FILE PATTERN '' acts how I would've expected @has FILE PATTERN to work. I.e., it treats PATTERN as an XPath but allows any text. After this issue is implemented, we could change @has FILE PATTERN to mean exactly that.

@camelid camelid self-assigned this Aug 10, 2022
@camelid camelid changed the title rustdoc: Rename @has FILE PATTERN to @hasliteral rustdoc: Rename @has FILE PATTERN to @has-literal Aug 10, 2022
@camelid camelid changed the title rustdoc: Rename @has FILE PATTERN to @has-literal rustdoc: Rename @has FILE PATTERN to @hastext Aug 10, 2022
camelid added a commit to camelid/rust that referenced this issue Aug 13, 2022
@bors bors closed this as completed in 4b51df3 Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant