Remove unused hir_id parameter from resolve_type

This commit is contained in:
Noah Lev 2021-08-26 17:47:29 -07:00
parent 6a84d34784
commit c2207f5a48
2 changed files with 7 additions and 7 deletions

View File

@ -906,7 +906,7 @@ impl Clean<bool> for hir::IsAuto {
impl Clean<Type> for hir::TraitRef<'_> {
fn clean(&self, cx: &mut DocContext<'_>) -> Type {
let path = self.path.clean(cx);
resolve_type(cx, path, self.hir_ref_id)
resolve_type(cx, path)
}
}
@ -1164,7 +1164,7 @@ impl Clean<Item> for ty::AssocItem {
fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
use rustc_hir::GenericParamCount;
let hir::Ty { hir_id, span, ref kind } = *hir_ty;
let hir::Ty { hir_id: _, span, ref kind } = *hir_ty;
let qpath = match kind {
hir::TyKind::Path(qpath) => qpath,
_ => unreachable!(),
@ -1271,7 +1271,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
return cx.enter_alias(ty_substs, lt_substs, ct_substs, |cx| ty.clean(cx));
}
let path = path.clean(cx);
resolve_type(cx, path, hir_id)
resolve_type(cx, path)
}
hir::QPath::Resolved(Some(ref qself), ref p) => {
// Try to normalize `<X as Y>::T` to a type
@ -1292,7 +1292,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
name: p.segments.last().expect("segments were empty").ident.name,
self_def_id: Some(DefId::local(qself.hir_id.owner.local_def_index)),
self_type: Box::new(qself.clean(cx)),
trait_: Box::new(resolve_type(cx, trait_path, hir_id)),
trait_: Box::new(resolve_type(cx, trait_path)),
}
}
hir::QPath::TypeRelative(ref qself, ref segment) => {
@ -1308,7 +1308,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
name: segment.ident.name,
self_def_id: res.opt_def_id(),
self_type: Box::new(qself.clean(cx)),
trait_: Box::new(resolve_type(cx, trait_path, hir_id)),
trait_: Box::new(resolve_type(cx, trait_path)),
}
}
hir::QPath::LangItem(..) => bug!("clean: requiring documentation of lang item"),

View File

@ -407,8 +407,8 @@ crate fn print_const_expr(tcx: TyCtxt<'_>, body: hir::BodyId) -> String {
}
/// Given a type Path, resolve it to a Type using the TyCtxt
crate fn resolve_type(cx: &mut DocContext<'_>, path: Path, id: hir::HirId) -> Type {
debug!("resolve_type({:?},{:?})", path, id);
crate fn resolve_type(cx: &mut DocContext<'_>, path: Path) -> Type {
debug!("resolve_type({:?})", path);
let is_generic = match path.res {
Res::PrimTy(p) => return Primitive(PrimitiveType::from(p)),