Skip to content

Commit af2040f

Browse files
Add tests for doc_keyword feature extension
1 parent f663093 commit af2040f

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![feature(doc_keyword)]
2+
3+
#[doc(keyword = "foo df")] //~ ERROR
4+
mod foo {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: `foo df` is not a valid identifier
2+
--> $DIR/invalid-keyword.rs:3:17
3+
|
4+
LL | #[doc(keyword = "foo df")]
5+
| ^^^^^^^^
6+
7+
error: aborting due to previous error
8+

src/test/rustdoc/keyword.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@
1414
#[doc(keyword = "match")]
1515
/// this is a test!
1616
mod foo{}
17+
18+
// @has foo/keyword.foo.html '//section[@id="main"]//div[@class="docblock"]//p' 'hello'
19+
#[doc(keyword = "foo")]
20+
/// hello
21+
mod bar {}

0 commit comments

Comments
 (0)