Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 27c7ec4

Browse files
committedMar 11, 2025·
Add ui test for new unused_footnote_definition rustdoc lint
1 parent 1bc04a2 commit 27c7ec4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This test ensures that the rustdoc `unused_footnote` is working as expected.
2+
3+
#![deny(rustdoc::unused_footnote_definition)]
4+
5+
//! Footnote referenced. [^2]
6+
//!
7+
//! [^1]: footnote defined
8+
//! [^2]: footnote defined
9+
//~^^ unused_footnote_definition
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: unused footnote definition
2+
--> $DIR/unused-footnote.rs:7:6
3+
|
4+
LL | //! [^1]: footnote defined
5+
| ^
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/unused-footnote.rs:3:9
9+
|
10+
LL | #![deny(rustdoc::unused_footnote_definition)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 1 previous error
14+

0 commit comments

Comments
 (0)
Please sign in to comment.