Skip to content

Commit 8f7f71c

Browse files
Add ui test for rustdoc broken_footnote lint
1 parent 89ad656 commit 8f7f71c

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![deny(rustdoc::broken_footnote)]
2+
#![allow(rustdoc::unportable_markdown)]
3+
4+
//! Footnote referenced [^1]. And [^2]. And [^bla].
5+
//!
6+
//! [^1]: footnote defined
7+
//~^^^ ERROR: no footnote definition matching this footnote
8+
//~| ERROR: no footnote definition matching this footnote
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
error: no footnote definition matching this footnote
2+
--> $DIR/broken-footnote.rs:4:45
3+
|
4+
LL | //! Footnote referenced [^1]. And [^2]. And [^bla].
5+
| -^^^^^
6+
| |
7+
| help: if it should not be a footnote, escape it: `\`
8+
|
9+
note: the lint level is defined here
10+
--> $DIR/broken-footnote.rs:1:9
11+
|
12+
LL | #![deny(rustdoc::broken_footnote)]
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^
14+
15+
error: no footnote definition matching this footnote
16+
--> $DIR/broken-footnote.rs:4:35
17+
|
18+
LL | //! Footnote referenced [^1]. And [^2]. And [^bla].
19+
| -^^^
20+
| |
21+
| help: if it should not be a footnote, escape it: `\`
22+
23+
error: aborting due to 2 previous errors
24+

0 commit comments

Comments
 (0)