Skip to content

Commit

Permalink
Test that using the previous lint names still applies the lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Mar 2, 2021
1 parent c7535d1 commit 75efb6e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/rustdoc-ui/renamed-lint-still-applies.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// compile-args: --crate-type lib
#![deny(broken_intra_doc_links)]
//~^ WARNING renamed
//! [x]
//~^ ERROR unresolved link
23 changes: 23 additions & 0 deletions src/test/rustdoc-ui/renamed-lint-still-applies.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
--> $DIR/renamed-lint-still-applies.rs:2:9
|
LL | #![deny(broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default

error: unresolved link to `x`
--> $DIR/renamed-lint-still-applies.rs:4:6
|
LL | //! [x]
| ^ no item named `x` in scope
|
note: the lint level is defined here
--> $DIR/renamed-lint-still-applies.rs:2:9
|
LL | #![deny(broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: aborting due to previous error; 1 warning emitted

0 comments on commit 75efb6e

Please sign in to comment.