

rustdoc: resolve intra-doc links when checking HTML by notriddle · Pull Request...
source link: https://github.com/rust-lang/rust/pull/93605
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Similar to #86451
CC #67799
Given this test case:
#![warn(rustdoc::invalid_html_tags)] #![warn(rustdoc::broken_intra_doc_links)] pub struct ExistentStruct<T>(T); /// This [test][ExistentStruct<i32>] thing! pub struct NoError;
This pull request silences the following, spurious warning:
warning: unclosed HTML tag `i32`
--> test.rs:6:31
|
6 | /// This [test][ExistentStruct<i32>] thing!
| ^^^^^
|
note: the lint level is defined here
--> test.rs:1:9
|
1 | #![warn(rustdoc::invalid_html_tags)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: try marking as source code
|
6 | /// This [test][`ExistentStruct<i32>`] thing!
| + +
warning: 1 warning emitted
Recommend
-
12
Conversation Copy link Contributor ...
-
8
Copy link Contributor notriddle commented
-
13
Copy link Contributor notriddle commented
-
6
Conversation Contributor...
-
14
Conversation Contributor Fixes...
-
5
Conversation Contributor This f...
-
4
Conversation Contributor Previe...
-
3
Contributor Blocked on
-
3
Summary Trait associated type queries work in rustdoc's type driven search. The data is included in the search-index.js file, and the queries are designed to "do what I mean" when users type them in, so, for e...
-
3
Conversation Contributor...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK