about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/doc/link_adjacent.fixed
blob: 0ac297a6b1973de3b2684c2167b372448c4e27ea (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#![warn(clippy::doc_link_code)]

//! Test case for code links that are adjacent to code text.
//!
//! This is not an example: `first``second`
//!
//! Neither is this: [`first`](x)
//!
//! Neither is this: [`first`](x) `second`
//!
//! Neither is this: [first](x)`second`
//!
//! This is: <code>[first](x)second</code>
//~^ ERROR: adjacent
//!
//! So is this <code>first[second](x)</code>
//~^ ERROR: adjacent
//!
//! So is this <code>[first](x)[second](x)</code>
//~^ ERROR: adjacent
//!
//! So is this <code>[first](x)[second](x)[third](x)</code>
//~^ ERROR: adjacent
//!
//! So is this <code>[first](x)second[third](x)</code>
//~^ ERROR: adjacent

/// Test case for code links that are adjacent to code text.
///
/// This is not an example: `first``second` arst
///
/// Neither is this: [`first`](x) arst
///
/// Neither is this: [`first`](x) `second` arst
///
/// Neither is this: [first](x)`second` arst
///
/// This is: <code>[first](x)second</code> arst
//~^ ERROR: adjacent
///
/// So is this <code>first[second](x)</code> arst
//~^ ERROR: adjacent
///
/// So is this <code>[first](x)[second](x)</code> arst
//~^ ERROR: adjacent
///
/// So is this <code>[first](x)[second](x)[third](x)</code> arst
//~^ ERROR: adjacent
///
/// So is this <code>[first](x)second[third](x)</code> arst
//~^ ERROR: adjacent
pub struct WithTrailing;