summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/intra-doc/prim-conflict.rs
blob: 2c1a8b5357aa165c38b29a9f43e090878d330e7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#![deny(rustdoc::broken_intra_doc_links)]
//~^ NOTE lint level is defined

/// [char]
//~^ ERROR both a module and a builtin type
//~| NOTE ambiguous link
//~| HELP to link to the module
//~| HELP to link to the builtin type

/// [type@char]
//~^ ERROR both a module and a builtin type
//~| NOTE ambiguous link
//~| HELP to link to the module
//~| HELP to link to the builtin type

/// [mod@char] // ok
/// [prim@char] // ok

/// [struct@char]
//~^ ERROR incompatible link
//~| HELP prefix with `mod@`
//~| NOTE resolved to a module
pub mod char {}

pub mod inner {
    //! [struct@char]
    //~^ ERROR incompatible link
    //~| HELP prefix with `prim@`
    //~| NOTE resolved to a builtin type
}