Closed
Description
use std::collections::HashMap;
/// [`HashMap`]
pub fn foo() {}
Compiling this will warn about the HashMap
import being unused, but it is required for the doc link to work. It would be nice if rustc handled this like Java's compiler does, where a doc link acts as a use of an import even when not building documentation. You can work around this with [HashMap](std::collections::HashMap)
but long imports in the doc block can get a bit gross.
Metadata
Metadata
Assignees
Labels
Area: Intra-doc links, the ability to link to items in docs by nameArea: Lints (warnings about flaws in source code) such as unused_mut.Category: An issue proposing an enhancement or a PR with one.Call for participation: Hard difficulty. Experience needed to fix: A lot.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.