Skip to content

Commit 5497f15

Browse files
committed
Add test for weird backticks placement
1 parent 56347a1 commit 5497f15

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed
+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
#![deny(warnings)]
2+
13
//! Linking to [foo@banana] and [`bar@banana!()`].
24
//~^ ERROR unknown disambiguator `foo`
35
//~| ERROR unknown disambiguator `bar`
46
//! And to [no disambiguator](@nectarine) and [another](@apricot!()).
57
//~^ ERROR unknown disambiguator ``
68
//~| ERROR unknown disambiguator ``
7-
8-
#![deny(warnings)]
9+
//! And with weird backticks: [``foo@hello``] [foo`@`hello].
10+
//~^ ERROR unknown disambiguator `foo`
11+
//~| ERROR unknown disambiguator `foo`
912

1013
fn main() {}
+18-6
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
error: unknown disambiguator `foo`
2-
--> $DIR/unknown-disambiguator.rs:1:17
2+
--> $DIR/unknown-disambiguator.rs:3:17
33
|
44
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
55
| ^^^
66
|
77
note: the lint level is defined here
8-
--> $DIR/unknown-disambiguator.rs:8:9
8+
--> $DIR/unknown-disambiguator.rs:1:9
99
|
1010
LL | #![deny(warnings)]
1111
| ^^^^^^^^
1212
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
1313

1414
error: unknown disambiguator `bar`
15-
--> $DIR/unknown-disambiguator.rs:1:35
15+
--> $DIR/unknown-disambiguator.rs:3:35
1616
|
1717
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
1818
| ^^^
1919

20+
error: unknown disambiguator `foo`
21+
--> $DIR/unknown-disambiguator.rs:9:34
22+
|
23+
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
24+
| ^^^
25+
26+
error: unknown disambiguator `foo`
27+
--> $DIR/unknown-disambiguator.rs:9:48
28+
|
29+
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
30+
| ^^^
31+
2032
error: unknown disambiguator ``
21-
--> $DIR/unknown-disambiguator.rs:4:31
33+
--> $DIR/unknown-disambiguator.rs:6:31
2234
|
2335
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
2436
| ^
2537

2638
error: unknown disambiguator ``
27-
--> $DIR/unknown-disambiguator.rs:4:57
39+
--> $DIR/unknown-disambiguator.rs:6:57
2840
|
2941
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
3042
| ^
3143

32-
error: aborting due to 4 previous errors
44+
error: aborting due to 6 previous errors
3345

0 commit comments

Comments
 (0)