Skip to content

Commit c9627d0

Browse files
Add ui test for rustdoc broken_footnote lint
1 parent 1bd4a0c commit c9627d0

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![deny(rustdoc::broken_footnote)]
2+
3+
//! Footnote referenced [^1]. And [^2]. And [^bla].
4+
//!
5+
//! [^1]: footnote defined
6+
//~^^^ ERROR: no footnote definition matching this footnote
7+
//~| 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:3:35
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:3:45
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)