Skip to content

Commit

Permalink
Remove unused hir_id parameter from resolve_type
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Sep 11, 2021
1 parent 6a84d34 commit c2207f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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!(),
Expand Down Expand Up @@ -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
Expand All @@ -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) => {
Expand All @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit c2207f5

Please sign in to comment.