]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/intra-doc/disambiguator-mismatch.rs
Rollup merge of #107194 - xfix:remove-slice-internals-dependency-in-rustc-ast, r...
[rust.git] / tests / rustdoc-ui / intra-doc / disambiguator-mismatch.rs
1 #![deny(rustdoc::broken_intra_doc_links)]
2 //~^ NOTE lint level is defined
3 pub enum S {}
4 fn S() {}
5
6 #[macro_export]
7 macro_rules! m {
8     () => {};
9 }
10
11 static s: usize = 0;
12 const c: usize = 0;
13
14 trait T {}
15
16 /// Link to [struct@S]
17 //~^ ERROR incompatible link kind for `S`
18 //~| NOTE this link resolved
19 //~| HELP prefix with `enum@`
20
21 /// Link to [mod@S]
22 //~^ ERROR incompatible link kind for `S`
23 //~| NOTE this link resolved
24 //~| HELP prefix with `enum@`
25
26 /// Link to [union@S]
27 //~^ ERROR incompatible link kind for `S`
28 //~| NOTE this link resolved
29 //~| HELP prefix with `enum@`
30
31 /// Link to [trait@S]
32 //~^ ERROR incompatible link kind for `S`
33 //~| NOTE this link resolved
34 //~| HELP prefix with `enum@`
35
36 /// Link to [struct@T]
37 //~^ ERROR incompatible link kind for `T`
38 //~| NOTE this link resolved
39 //~| HELP prefix with `trait@`
40
41 /// Link to [derive@m]
42 //~^ ERROR incompatible link kind for `m`
43 //~| NOTE this link resolved
44 //~| HELP add an exclamation mark
45
46 /// Link to [m()]
47 //~^ ERROR unresolved link to `m`
48 //~| NOTE this link resolves to the macro `m`
49 //~| HELP add an exclamation mark
50 /// and to [m!()]
51
52 /// Link to [const@s]
53 //~^ ERROR incompatible link kind for `s`
54 //~| NOTE this link resolved
55 //~| HELP prefix with `static@`
56
57 /// Link to [static@c]
58 //~^ ERROR incompatible link kind for `c`
59 //~| NOTE this link resolved
60 //~| HELP prefix with `const@`
61
62 /// Link to [fn@c]
63 //~^ ERROR incompatible link kind for `c`
64 //~| NOTE this link resolved
65 //~| HELP prefix with `const@`
66
67 /// Link to [c()]
68 //~^ ERROR incompatible link kind for `c`
69 //~| NOTE this link resolved
70 //~| HELP prefix with `const@`
71
72 /// Link to [const@f]
73 //~^ ERROR incompatible link kind for `f`
74 //~| NOTE this link resolved
75 //~| HELP add parentheses
76
77 /// Link to [fn@std]
78 //~^ ERROR unresolved link to `std`
79 //~| NOTE this link resolves to the crate `std`
80 //~| HELP to link to the crate, prefix with `mod@`
81 pub fn f() {}