Skip to content

Commit 80408ef

Browse files
committed
Add regression test for #7758
1 parent b9d753e commit 80408ef

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/ui/doc/doc.rs

+5
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ fn issue_2343() {}
203203
/// __|_ _|__||_|
204204
fn pulldown_cmark_crash() {}
205205

206+
/// This should not lint
207+
/// (regression test for #7758)
208+
/// [plain text][path::to::item]
209+
fn intra_doc_link() {}
210+
206211
// issue #7033 - generic_const_exprs ICE
207212
struct S<T, const N: usize>
208213
where [(); N.checked_next_power_of_two().unwrap()]: {

tests/ui/doc/doc.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,11 @@ error: you should put `mycrate::Collection` between ticks in the documentation
186186
LL | /// An iterator over mycrate::Collection's values.
187187
| ^^^^^^^^^^^^^^^^^^^
188188

189-
error: aborting due to 31 previous errors
189+
error: you should put `text][path::to::item` between ticks in the documentation
190+
--> $DIR/doc.rs:208:12
191+
|
192+
LL | /// [plain text][path::to::item]
193+
| ^^^^^^^^^^^^^^^^^^^^
194+
195+
error: aborting due to 32 previous errors
190196

0 commit comments

Comments
 (0)