]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/intra-links-warning.rs
Auto merge of #61817 - eddyb:begone-gcx-attempt-2, r=oli-obk
[rust.git] / src / test / rustdoc-ui / intra-links-warning.rs
1 // compile-pass
2
3        //! Test with [Foo::baz], [Bar::foo], ...
4      //! , [Uniooon::X] and [Qux::Z].
5        //!
6       //! , [Uniooon::X] and [Qux::Z].
7
8        /// [Qux:Y]
9 pub struct Foo {
10     pub bar: usize,
11 }
12
13 /// Foo
14 /// bar [BarA] bar
15 /// baz
16 pub fn a() {}
17
18 /**
19  * Foo
20  * bar [BarB] bar
21  * baz
22  */
23 pub fn b() {}
24
25 /** Foo
26
27 bar [BarC] bar
28 baz
29
30     let bar_c_1 = 0;
31     let bar_c_2 = 0;
32     let g = [bar_c_1];
33     let h = g[bar_c_2];
34
35 */
36 pub fn c() {}
37
38 #[doc = "Foo\nbar [BarD] bar\nbaz"]
39 pub fn d() {}
40
41 macro_rules! f {
42     ($f:expr) => {
43         #[doc = $f]
44         pub fn f() {}
45     }
46 }
47 f!("Foo\nbar [BarF] bar\nbaz");
48
49 /** # for example,
50  *
51  * time to introduce a link [error]*/
52 pub struct A;
53
54 /**
55  * # for example,
56  *
57  * time to introduce a link [error]
58  */
59 pub struct B;
60
61 #[doc = "single line [error]"]
62 pub struct C;
63
64 #[doc = "single line with \"escaping\" [error]"]
65 pub struct D;
66
67 /// Item docs.
68 #[doc="Hello there!"]
69 /// [error]
70 pub struct E;
71
72 ///
73 /// docs [error1]
74
75 /// docs [error2]
76 ///
77 pub struct F;