]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/intra-link-errors.rs
Remove some TODOs
[rust.git] / src / test / rustdoc-ui / intra-link-errors.rs
1 #![deny(broken_intra_doc_links)]
2 //~^ NOTE lint level is defined
3
4 // FIXME: this should say that it was skipped (maybe an allowed by default lint?)
5 /// [<invalid syntax>]
6
7 // FIXME: this could say which path was the first to not be found (in this case, `path`)
8 /// [path::to::nonexistent::module]
9 //~^ ERROR unresolved link
10 //~| NOTE no item named `path::to` is in scope
11 //~| HELP to escape
12
13 /// [f::A]
14 //~^ ERROR unresolved link
15 //~| NOTE this link partially resolves
16 //~| NOTE `f` is a function, not a module
17
18 /// [S::A]
19 //~^ ERROR unresolved link
20 //~| NOTE this link partially resolves
21 //~| NOTE no `A` in `S`
22
23 /// [S::fmt]
24 //~^ ERROR unresolved link
25 //~| NOTE this link partially resolves
26 //~| NOTE no `fmt` in `S`
27
28 /// [E::D]
29 //~^ ERROR unresolved link
30 //~| NOTE this link partially resolves
31 //~| NOTE no `D` in `E`
32
33 /// [u8::not_found]
34 //~^ ERROR unresolved link
35 //~| NOTE the builtin type `u8` does not have an associated item named `not_found`
36
37 /// [S!]
38 //~^ ERROR unresolved link
39 //~| HELP to link to the struct, use its disambiguator
40 //~| NOTE this link resolves to the struct `S`
41 pub fn f() {}
42 #[derive(Debug)]
43 pub struct S;
44
45 pub enum E { A, B, C }
46
47 /// [type@S::h]
48 //~^ ERROR unresolved link
49 //~| HELP to link to the associated function
50 //~| NOTE not in the type namespace
51 impl S {
52     pub fn h() {}
53 }
54
55 /// [type@T::g]
56 //~^ ERROR unresolved link
57 //~| HELP to link to the associated function
58 //~| NOTE not in the type namespace
59
60 /// [T::h!]
61 //~^ ERROR unresolved link
62 //~| NOTE no item named `T::h`
63 //~| HELP to escape
64 pub trait T {
65     fn g() {}
66 }