Closed
Description
We have some relative links in doc, e.g., the link of qpath_res
in the comments for QPath
:
/// Represents an optionally `Self`-qualified value/type path or associated extension.
///
/// To resolve the path to a `DefId`, call [`qpath_res`].
///
/// [`qpath_res`]: ../../rustc_middle/ty/struct.TypeckResults.html#method.qpath_res
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub enum QPath<'hir> { ... }
but we will get the Not Found
page if we click it in https://doc.rust-lang.org/stable/nightly-rustc/rustc_hir/enum.QPath.html, which is re-exported.
So I think we can fix this by two ways:
- Don't use relative path in rustc doc
- Don't generate new link for re-exported items, use the same links with the original definition
but for the second option, we may have private middle mods, so it may be not a solution.