2020-12-29 22:16:16 -06:00
|
|
|
#![deny(rustdoc::broken_intra_doc_links)]
|
2020-08-02 19:45:24 -05:00
|
|
|
//~^ NOTE lint level is defined
|
2024-09-19 16:42:55 -05:00
|
|
|
pub enum S {
|
|
|
|
A,
|
|
|
|
}
|
2021-07-19 10:00:35 -05:00
|
|
|
fn S() {}
|
2020-08-02 19:45:24 -05:00
|
|
|
|
2021-07-19 10:00:35 -05:00
|
|
|
#[macro_export]
|
2020-08-02 19:45:24 -05:00
|
|
|
macro_rules! m {
|
|
|
|
() => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
static s: usize = 0;
|
|
|
|
const c: usize = 0;
|
|
|
|
|
|
|
|
trait T {}
|
|
|
|
|
2024-09-19 16:42:55 -05:00
|
|
|
struct X {
|
|
|
|
y: usize,
|
|
|
|
}
|
|
|
|
|
2020-08-02 19:45:24 -05:00
|
|
|
/// Link to [struct@S]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `S`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `enum@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [mod@S]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `S`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `enum@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [union@S]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `S`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `enum@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [trait@S]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `S`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `enum@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [struct@T]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `T`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `trait@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [derive@m]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `m`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-25 15:21:02 -05:00
|
|
|
//~| HELP add an exclamation mark
|
2020-08-02 19:45:24 -05:00
|
|
|
|
2021-07-19 10:00:35 -05:00
|
|
|
/// Link to [m()]
|
|
|
|
//~^ ERROR unresolved link to `m`
|
|
|
|
//~| NOTE this link resolves to the macro `m`
|
|
|
|
//~| HELP add an exclamation mark
|
|
|
|
/// and to [m!()]
|
|
|
|
|
2020-08-02 19:45:24 -05:00
|
|
|
/// Link to [const@s]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `s`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `static@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [static@c]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `c`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `const@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [fn@c]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `c`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `const@`
|
2020-08-02 19:45:24 -05:00
|
|
|
|
|
|
|
/// Link to [c()]
|
2020-08-04 22:39:18 -05:00
|
|
|
//~^ ERROR incompatible link kind for `c`
|
2020-08-04 22:31:36 -05:00
|
|
|
//~| NOTE this link resolved
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP prefix with `const@`
|
2020-08-05 19:46:02 -05:00
|
|
|
|
|
|
|
/// Link to [const@f]
|
|
|
|
//~^ ERROR incompatible link kind for `f`
|
|
|
|
//~| NOTE this link resolved
|
2020-08-25 15:21:02 -05:00
|
|
|
//~| HELP add parentheses
|
2022-01-06 16:49:28 -06:00
|
|
|
|
|
|
|
/// Link to [fn@std]
|
|
|
|
//~^ ERROR unresolved link to `std`
|
|
|
|
//~| NOTE this link resolves to the crate `std`
|
2022-01-06 16:43:27 -06:00
|
|
|
//~| HELP to link to the crate, prefix with `mod@`
|
2024-09-19 16:42:55 -05:00
|
|
|
|
|
|
|
/// Link to [method@X::y]
|
|
|
|
//~^ ERROR incompatible link kind for `X::y`
|
|
|
|
//~| NOTE this link resolved
|
|
|
|
//~| HELP prefix with `field@`
|
|
|
|
|
|
|
|
/// Link to [field@S::A]
|
2024-10-03 19:42:08 -05:00
|
|
|
//~^ ERROR unresolved link to `S::A`
|
|
|
|
//~| NOTE this link resolves
|
2024-09-19 16:42:55 -05:00
|
|
|
//~| HELP prefix with `variant@`
|
2020-08-02 19:45:24 -05:00
|
|
|
pub fn f() {}
|