diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-02-28 00:49:15 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-03-01 20:26:15 -0500 |
| commit | 75efb6efa34adf6436b4cb687f3a57f29bb635c7 (patch) | |
| tree | 8152a0d0e10c480e38780d9f36648ccad5881872 /src/test/rustdoc-ui | |
| parent | c7535d13617078029f870a5ccc9258b42dc360b8 (diff) | |
| download | rust-75efb6efa34adf6436b4cb687f3a57f29bb635c7.tar.gz rust-75efb6efa34adf6436b4cb687f3a57f29bb635c7.zip | |
Test that using the previous lint names still applies the lint
Diffstat (limited to 'src/test/rustdoc-ui')
| -rw-r--r-- | src/test/rustdoc-ui/renamed-lint-still-applies.rs | 5 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/renamed-lint-still-applies.stderr | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/renamed-lint-still-applies.rs b/src/test/rustdoc-ui/renamed-lint-still-applies.rs new file mode 100644 index 00000000000..6d4bad16aad --- /dev/null +++ b/src/test/rustdoc-ui/renamed-lint-still-applies.rs @@ -0,0 +1,5 @@ +// compile-args: --crate-type lib +#![deny(broken_intra_doc_links)] +//~^ WARNING renamed +//! [x] +//~^ ERROR unresolved link diff --git a/src/test/rustdoc-ui/renamed-lint-still-applies.stderr b/src/test/rustdoc-ui/renamed-lint-still-applies.stderr new file mode 100644 index 00000000000..e14cbfa1726 --- /dev/null +++ b/src/test/rustdoc-ui/renamed-lint-still-applies.stderr @@ -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 + |
