Skip to content

Commit 75efb6e

Browse files
committed
Test that using the previous lint names still applies the lint
1 parent c7535d1 commit 75efb6e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// compile-args: --crate-type lib
2+
#![deny(broken_intra_doc_links)]
3+
//~^ WARNING renamed
4+
//! [x]
5+
//~^ ERROR unresolved link
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
2+
--> $DIR/renamed-lint-still-applies.rs:2:9
3+
|
4+
LL | #![deny(broken_intra_doc_links)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
6+
|
7+
= note: `#[warn(renamed_and_removed_lints)]` on by default
8+
9+
error: unresolved link to `x`
10+
--> $DIR/renamed-lint-still-applies.rs:4:6
11+
|
12+
LL | //! [x]
13+
| ^ no item named `x` in scope
14+
|
15+
note: the lint level is defined here
16+
--> $DIR/renamed-lint-still-applies.rs:2:9
17+
|
18+
LL | #![deny(broken_intra_doc_links)]
19+
| ^^^^^^^^^^^^^^^^^^^^^^
20+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
21+
22+
error: aborting due to previous error; 1 warning emitted
23+

0 commit comments

Comments
 (0)