rustdoc: Skip doc link resolution for non-exported items

This commit is contained in:
Vadim Petrochenkov
2023-02-11 19:14:25 +04:00
parent 84dd6dfd9d
commit bec4eab3f9
5 changed files with 45 additions and 11 deletions

View File

@@ -4236,7 +4236,10 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
{
return;
}
ResolveDocLinks::Exported if !maybe_exported.eval(self.r) => {
ResolveDocLinks::Exported
if !maybe_exported.eval(self.r)
&& !rustdoc::has_primitive_or_keyword_docs(attrs) =>
{
return;
}
ResolveDocLinks::ExportedMetadata