-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: improve rustdoc HTML suggestions handling of nested generics
Based on some poor suggestions produced when stablizing this lint and running it on `manformed-generics.rs`
- Loading branch information
Showing
6 changed files
with
330 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 39 additions & 9 deletions
48
src/test/rustdoc-ui/suggestions/html-as-generics-no-suggestions.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,68 @@ | ||
error: unclosed HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:11:13 | ||
error: unclosed HTML tag `Item` | ||
--> $DIR/html-as-generics-no-suggestions.rs:11:28 | ||
| | ||
LL | /// This Vec<i32 class="test"> thing! | ||
| ^^^^ | ||
LL | /// This <[u32] as Iterator<Item>> thing! | ||
| ^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/html-as-generics-no-suggestions.rs:1:9 | ||
| | ||
LL | #![deny(rustdoc::invalid_html_tags)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: unclosed HTML tag `Vec` | ||
--> $DIR/html-as-generics-no-suggestions.rs:25:10 | ||
| | ||
LL | /// This <Vec as IntoIter>::Iter thing! | ||
| ^^^^ | ||
|
||
error: unclosed HTML tag `Vec` | ||
--> $DIR/html-as-generics-no-suggestions.rs:32:13 | ||
| | ||
LL | /// This Vec<Vec as IntoIter>::Iter thing! | ||
| ^^^^ | ||
|
||
error: unclosed HTML tag `Vec` | ||
--> $DIR/html-as-generics-no-suggestions.rs:39:13 | ||
| | ||
LL | /// This Vec<Vec as IntoIter> thing! | ||
| ^^^^ | ||
|
||
error: unclosed HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:46:17 | ||
| | ||
LL | /// This Vec<Vec<i32> as IntoIter> thing! | ||
| ^^^^^ | ||
|
||
error: unclosed HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:53:13 | ||
| | ||
LL | /// This Vec<i32 class="test"> thing! | ||
| ^^^^ | ||
|
||
error: unopened HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:20:13 | ||
--> $DIR/html-as-generics-no-suggestions.rs:62:13 | ||
| | ||
LL | /// This Vec</i32> thing! | ||
| ^^^^^^ | ||
|
||
error: unclosed HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:25:13 | ||
--> $DIR/html-as-generics-no-suggestions.rs:67:13 | ||
| | ||
LL | /// This 123<i32> thing! | ||
| ^^^^^ | ||
|
||
error: unclosed HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:30:14 | ||
--> $DIR/html-as-generics-no-suggestions.rs:72:14 | ||
| | ||
LL | /// This Vec:<i32> thing! | ||
| ^^^^^ | ||
|
||
error: unclosed HTML tag `i32` | ||
--> $DIR/html-as-generics-no-suggestions.rs:35:39 | ||
--> $DIR/html-as-generics-no-suggestions.rs:77:39 | ||
| | ||
LL | /// This [link](https://rust-lang.org)<i32> thing! | ||
| ^^^^^ | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to 10 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.