Skip to content

Commit 030f453

Browse files
authored
Rollup merge of #101824 - notriddle:notriddle/html-as-generics-intra-doc-links, r=Mark-Simulacrum
rustdoc: add test cases for turning ``[Vec<T>]`` into ``[`Vec<T>`]``
2 parents 4757d2d + 1ec92c8 commit 030f453

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

src/test/rustdoc-ui/suggestions/html-as-generics.fixed

+10
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,13 @@ pub struct NestedGenericsWithPunct;
7070
//~^ ERROR unclosed HTML tag `i32`
7171
//~|HELP try marking as source
7272
pub struct NestedGenericsWithPunct2;
73+
74+
/// This [`Vec<i32>`] thing!
75+
//~^ERROR unclosed HTML tag `i32`
76+
//~|HELP try marking as source
77+
pub struct IntraDocLink;
78+
79+
/// This [`Vec::<i32>`] thing!
80+
//~^ERROR unclosed HTML tag `i32`
81+
//~|HELP try marking as source
82+
pub struct IntraDocLinkTurbofish;

src/test/rustdoc-ui/suggestions/html-as-generics.rs

+10
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,13 @@ pub struct NestedGenericsWithPunct;
7070
//~^ ERROR unclosed HTML tag `i32`
7171
//~|HELP try marking as source
7272
pub struct NestedGenericsWithPunct2;
73+
74+
/// This [Vec<i32>] thing!
75+
//~^ERROR unclosed HTML tag `i32`
76+
//~|HELP try marking as source
77+
pub struct IntraDocLink;
78+
79+
/// This [Vec::<i32>] thing!
80+
//~^ERROR unclosed HTML tag `i32`
81+
//~|HELP try marking as source
82+
pub struct IntraDocLinkTurbofish;

src/test/rustdoc-ui/suggestions/html-as-generics.stderr

+23-1
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,27 @@ help: try marking as source code
157157
LL | /// Generics with punct `Vec<Vec<i32>>`!
158158
| + +
159159

160-
error: aborting due to 14 previous errors
160+
error: unclosed HTML tag `i32`
161+
--> $DIR/html-as-generics.rs:74:14
162+
|
163+
LL | /// This [Vec<i32>] thing!
164+
| ^^^^^
165+
|
166+
help: try marking as source code
167+
|
168+
LL | /// This [`Vec<i32>`] thing!
169+
| + +
170+
171+
error: unclosed HTML tag `i32`
172+
--> $DIR/html-as-generics.rs:79:16
173+
|
174+
LL | /// This [Vec::<i32>] thing!
175+
| ^^^^^
176+
|
177+
help: try marking as source code
178+
|
179+
LL | /// This [`Vec::<i32>`] thing!
180+
| + +
181+
182+
error: aborting due to 16 previous errors
161183

0 commit comments

Comments
 (0)