2020-08-20 15:41:18 +00:00
|
|
|
#![deny(broken_intra_doc_links)]
|
|
|
|
//~^ NOTE lint level is defined
|
|
|
|
|
|
|
|
// FIXME: this should say that it was skipped (maybe an allowed by default lint?)
|
|
|
|
/// [<invalid syntax>]
|
|
|
|
|
|
|
|
// FIXME: this could say which path was the first to not be found (in this case, `path`)
|
|
|
|
/// [path::to::nonexistent::module]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-21 04:23:23 +00:00
|
|
|
//~| NOTE no item named `path::to` is in scope
|
2020-08-20 15:41:18 +00:00
|
|
|
//~| HELP to escape
|
|
|
|
|
|
|
|
// TODO: why does this say `f` and not `f::A`??
|
|
|
|
/// [f::A]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-21 04:23:23 +00:00
|
|
|
//~| NOTE this link partially resolves
|
|
|
|
//~| NOTE `f` is a function, not a module
|
2020-08-20 15:41:18 +00:00
|
|
|
|
|
|
|
/// [S::A]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE this link partially resolves
|
2020-08-21 03:14:41 +00:00
|
|
|
//~| NOTE no `A` in `S`
|
2020-08-20 15:41:18 +00:00
|
|
|
|
|
|
|
/// [S::fmt]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE this link partially resolves
|
2020-08-21 03:14:41 +00:00
|
|
|
//~| NOTE no `fmt` in `S`
|
2020-08-20 15:41:18 +00:00
|
|
|
|
|
|
|
/// [E::D]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE this link partially resolves
|
2020-08-21 03:14:41 +00:00
|
|
|
//~| NOTE no `D` in `E`
|
2020-08-20 15:41:18 +00:00
|
|
|
|
|
|
|
/// [u8::not_found]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE the builtin type `u8` does not have an associated item named `not_found`
|
|
|
|
|
|
|
|
/// [S!]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-21 03:14:41 +00:00
|
|
|
//~| HELP to link to the struct, use its disambiguator
|
|
|
|
//~| NOTE this link resolves to the struct `S`
|
2020-08-20 15:41:18 +00:00
|
|
|
pub fn f() {}
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct S;
|
|
|
|
|
|
|
|
pub enum E { A, B, C }
|
|
|
|
|
|
|
|
/// [type@S::h]
|
2020-08-21 03:05:47 +00:00
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| HELP to link to the associated function
|
|
|
|
//~| NOTE not in the type namespace
|
2020-08-20 15:41:18 +00:00
|
|
|
impl S {
|
|
|
|
pub fn h() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// [type@T::g]
|
2020-08-21 03:05:47 +00:00
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| HELP to link to the associated function
|
|
|
|
//~| NOTE not in the type namespace
|
|
|
|
|
2020-08-21 02:31:44 +00:00
|
|
|
/// [T::h!]
|
2020-08-21 03:14:41 +00:00
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE no item named `T::h`
|
|
|
|
//~| HELP to escape
|
2020-08-20 15:41:18 +00:00
|
|
|
pub trait T {
|
|
|
|
fn g() {}
|
|
|
|
}
|