Intra-doc links does not link to std and does not use dev-dependencies

There are two strange things I found in intra-doc links.

First, when I use [`String`] or even [`std::string::String`] in my doc, the generated intra-doc links is to alloc::string::String. I know maybe std re-exports some structs in alloc, core, etc. but for a beginner who does not know well about rust, he may be confused when clicking the link to String and get an unfamiliar path. So what can I do if I want to link to std page?

Second, I have crate foo and bar. If I list foo in bar's dependencies, then the intra-doc links to foo::SomeStruct is right, but if I list foo in bar's dev-dependencies instead, intra-doc links cannot generate the correct link. I think this stiuation is quite common when we are writing documents for a proc macro crate, which provides derive macros for another crate.

These would be great issues to file at the Rust github repo if they haven’t been reported yet, under this tag:

OK, I will file two separate issues. Thank you.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.