Add tests for doc_keyword feature extension

This commit is contained in:
Guillaume Gomez 2020-11-27 14:28:17 +01:00
parent f663093222
commit af2040ff95
3 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,4 @@
#![feature(doc_keyword)]
#[doc(keyword = "foo df")] //~ ERROR
mod foo {}

View file

@ -0,0 +1,8 @@
error: `foo df` is not a valid identifier
--> $DIR/invalid-keyword.rs:3:17
|
LL | #[doc(keyword = "foo df")]
| ^^^^^^^^
error: aborting due to previous error

View file

@ -14,3 +14,8 @@
#[doc(keyword = "match")]
/// this is a test!
mod foo{}
// @has foo/keyword.foo.html '//section[@id="main"]//div[@class="docblock"]//p' 'hello'
#[doc(keyword = "foo")]
/// hello
mod bar {}