Skip to content

Commit

Permalink
Add test for EXISTING_DOC_KEYWORD internal lint
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 3, 2020
1 parent 56c64f8 commit 0105e4a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui-fulldeps/internal-lints/existing_doc_keyword.rs
@@ -0,0 +1,9 @@
// compile-flags: -Z unstable-options

#![feature(rustc_private)]
#![feature(doc_keyword)]

#![crate_type = "lib"]

#[doc(keyword = "tadam")] //~ ERROR
mod tadam {}
11 changes: 11 additions & 0 deletions src/test/ui-fulldeps/internal-lints/existing_doc_keyword.stderr
@@ -0,0 +1,11 @@
error: Found non-existing keyword `tadam` used in `#[doc(keyword = "...")]`
--> $DIR/existing_doc_keyword.rs:8:1
|
LL | #[doc(keyword = "tadam")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[deny(rustc::existing_doc_keyword)]` on by default
= help: only existing keywords are allowed in core/std

error: aborting due to previous error

0 comments on commit 0105e4a

Please sign in to comment.