Add test for EXISTING_DOC_KEYWORD internal lint
This commit is contained in:
parent
56c64f871e
commit
0105e4a54b
@ -0,0 +1,9 @@
|
||||
// compile-flags: -Z unstable-options
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(doc_keyword)]
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[doc(keyword = "tadam")] //~ ERROR
|
||||
mod tadam {}
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user