-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #79541 - GuillaumeGomez:doc-keyword-lint-pass, r=lcnr
Doc keyword lint pass `x.py test` doesn't seem to work locally for multiple reasons so simpler to just run CI...
- Loading branch information
Showing
5 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/test/ui-fulldeps/internal-lints/existing_doc_keyword.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// compile-flags: -Z unstable-options | ||
|
||
#![feature(rustc_private)] | ||
#![feature(doc_keyword)] | ||
|
||
#![crate_type = "lib"] | ||
|
||
#![deny(rustc::existing_doc_keyword)] | ||
|
||
#[doc(keyword = "tadam")] //~ ERROR | ||
mod tadam {} |
15 changes: 15 additions & 0 deletions
15
src/test/ui-fulldeps/internal-lints/existing_doc_keyword.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error: Found non-existing keyword `tadam` used in `#[doc(keyword = "...")]` | ||
--> $DIR/existing_doc_keyword.rs:10:1 | ||
| | ||
LL | #[doc(keyword = "tadam")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/existing_doc_keyword.rs:8:9 | ||
| | ||
LL | #![deny(rustc::existing_doc_keyword)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= help: only existing keywords are allowed in core/std | ||
|
||
error: aborting due to previous error | ||
|