2020-12-29 22:16:16 -06:00
|
|
|
#![deny(rustdoc::broken_intra_doc_links)]
|
2020-08-20 10:41:18 -05:00
|
|
|
//~^ NOTE lint level is defined
|
|
|
|
|
|
|
|
// FIXME: this should say that it was skipped (maybe an allowed by default lint?)
|
2020-10-09 00:24:34 -05:00
|
|
|
/// [invalid intra-doc syntax!!]
|
2020-08-20 10:41:18 -05:00
|
|
|
|
|
|
|
/// [path::to::nonexistent::module]
|
|
|
|
//~^ ERROR unresolved link
|
2020-10-02 21:53:09 -05:00
|
|
|
//~| NOTE no item named `path` in scope
|
2020-08-20 10:41:18 -05:00
|
|
|
|
2020-08-31 22:28:38 -05:00
|
|
|
/// [path::to::nonexistent::macro!]
|
|
|
|
//~^ ERROR unresolved link
|
2020-10-02 21:53:09 -05:00
|
|
|
//~| NOTE no item named `path` in scope
|
2020-08-31 22:28:38 -05:00
|
|
|
|
|
|
|
/// [type@path::to::nonexistent::type]
|
|
|
|
//~^ ERROR unresolved link
|
2020-10-02 21:53:09 -05:00
|
|
|
//~| NOTE no item named `path` in scope
|
2020-08-31 22:28:38 -05:00
|
|
|
|
2020-08-21 15:37:31 -05:00
|
|
|
/// [std::io::not::here]
|
|
|
|
//~^ ERROR unresolved link
|
2020-10-02 21:53:09 -05:00
|
|
|
//~| NOTE no item named `not` in module `io`
|
2020-09-19 23:32:00 -05:00
|
|
|
|
|
|
|
/// [type@std::io::not::here]
|
|
|
|
//~^ ERROR unresolved link
|
2020-10-02 21:53:09 -05:00
|
|
|
//~| NOTE no item named `not` in module `io`
|
2020-08-21 15:37:31 -05:00
|
|
|
|
|
|
|
/// [std::io::Error::x]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE the struct `Error` has no field
|
|
|
|
|
|
|
|
/// [std::io::ErrorKind::x]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE the enum `ErrorKind` has no variant
|
|
|
|
|
2020-08-20 10:41:18 -05:00
|
|
|
/// [f::A]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-20 23:23:23 -05:00
|
|
|
//~| NOTE `f` is a function, not a module
|
2020-08-20 10:41:18 -05:00
|
|
|
|
2020-09-19 23:32:00 -05:00
|
|
|
/// [f::A!]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE `f` is a function, not a module
|
|
|
|
|
2020-08-20 10:41:18 -05:00
|
|
|
/// [S::A]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-21 12:35:50 -05:00
|
|
|
//~| NOTE struct `S` has no field or associated item
|
2020-08-20 10:41:18 -05:00
|
|
|
|
|
|
|
/// [S::fmt]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-21 12:35:50 -05:00
|
|
|
//~| NOTE struct `S` has no field or associated item
|
2020-08-20 10:41:18 -05:00
|
|
|
|
|
|
|
/// [E::D]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-21 12:35:50 -05:00
|
|
|
//~| NOTE enum `E` has no variant or associated item
|
2020-08-20 10:41:18 -05:00
|
|
|
|
|
|
|
/// [u8::not_found]
|
|
|
|
//~^ ERROR unresolved link
|
2020-09-20 01:39:19 -05:00
|
|
|
//~| NOTE the builtin type `u8` has no associated item named `not_found`
|
|
|
|
|
|
|
|
/// [std::primitive::u8::not_found]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| NOTE the builtin type `u8` has no associated item named `not_found`
|
|
|
|
|
|
|
|
/// [type@Vec::into_iter]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| HELP to link to the associated function, add parentheses
|
|
|
|
//~| NOTE this link resolves to the associated function `into_iter`
|
2020-08-20 10:41:18 -05:00
|
|
|
|
|
|
|
/// [S!]
|
|
|
|
//~^ ERROR unresolved link
|
2020-08-27 23:53:36 -05:00
|
|
|
//~| HELP to link to the struct, prefix with `struct@`
|
2020-08-20 22:14:41 -05:00
|
|
|
//~| NOTE this link resolves to the struct `S`
|
2020-08-20 10:41:18 -05:00
|
|
|
pub fn f() {}
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct S;
|
|
|
|
|
|
|
|
pub enum E { A, B, C }
|
|
|
|
|
|
|
|
/// [type@S::h]
|
2020-08-20 22:05:47 -05:00
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| HELP to link to the associated function
|
|
|
|
//~| NOTE not in the type namespace
|
2020-08-20 10:41:18 -05:00
|
|
|
impl S {
|
|
|
|
pub fn h() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// [type@T::g]
|
2020-08-20 22:05:47 -05:00
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| HELP to link to the associated function
|
|
|
|
//~| NOTE not in the type namespace
|
|
|
|
|
2020-08-20 21:31:44 -05:00
|
|
|
/// [T::h!]
|
2020-08-20 22:14:41 -05:00
|
|
|
//~^ ERROR unresolved link
|
2020-08-28 00:31:33 -05:00
|
|
|
//~| NOTE `T` has no macro named `h`
|
2020-08-20 10:41:18 -05:00
|
|
|
pub trait T {
|
|
|
|
fn g() {}
|
|
|
|
}
|
2020-08-21 15:37:31 -05:00
|
|
|
|
|
|
|
/// [m()]
|
|
|
|
//~^ ERROR unresolved link
|
|
|
|
//~| HELP to link to the macro
|
|
|
|
//~| NOTE not in the value namespace
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! m {
|
|
|
|
() => {};
|
|
|
|
}
|