Skip to content

Commit a3f56b3

Browse files
committed
Remove many uses of CURRENT_DEPTH from html/format.rs
1 parent 3f1ab9d commit a3f56b3

File tree

6 files changed

+307
-222
lines changed

6 files changed

+307
-222
lines changed

src/librustdoc/clean/utils.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,10 @@ crate fn resolve_type(cx: &mut DocContext<'_>, path: Path, id: hir::HirId) -> Ty
414414
return Generic(kw::SelfUpper);
415415
}
416416
Res::Def(DefKind::TyParam, _) if path.segments.len() == 1 => {
417-
return Generic(Symbol::intern(&format!("{:#}", path.print(&cx.cache))));
417+
// FIXME(camelid): I hope passing 0 as the depth doesn't break anything....
418+
// Then again, I think used to be 0 anyway through CURRENT_DEPTH
419+
// because (I think) rendering hadn't started yet.
420+
return Generic(Symbol::intern(&format!("{:#}", path.print(&cx.cache, 0))));
418421
}
419422
Res::SelfTy(..) | Res::Def(DefKind::TyParam | DefKind::AssocTy, _) => true,
420423
_ => false,

0 commit comments

Comments
 (0)