Add regression test for #111189

This commit is contained in:
Guillaume Gomez 2023-05-04 13:14:51 +02:00
parent 234927e098
commit bcdfda1b6b
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,10 @@
// Regression test for <https://github.com/rust-lang/rust/issues/111189>.
// This test ensures that it doesn't crash.
#![deny(warnings)]
/// #[rustfmt::skip]
//~^ ERROR unresolved link to `rustfmt::skip`
/// #[clippy::whatever]
//~^ ERROR unresolved link to `clippy::whatever`
pub fn foo() {}

View File

@ -0,0 +1,21 @@
error: unresolved link to `rustfmt::skip`
--> $DIR/issue-111189-resolution-ice.rs:6:7
|
LL | /// #[rustfmt::skip]
| ^^^^^^^^^^^^^ no item named `rustfmt` in scope
|
note: the lint level is defined here
--> $DIR/issue-111189-resolution-ice.rs:4:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
error: unresolved link to `clippy::whatever`
--> $DIR/issue-111189-resolution-ice.rs:8:7
|
LL | /// #[clippy::whatever]
| ^^^^^^^^^^^^^^^^ no item named `clippy` in scope
error: aborting due to 2 previous errors