Skip to content

Commit c2207f5

Browse files
committed
Remove unused hir_id parameter from resolve_type
1 parent 6a84d34 commit c2207f5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/librustdoc/clean/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ impl Clean<bool> for hir::IsAuto {
906906
impl Clean<Type> for hir::TraitRef<'_> {
907907
fn clean(&self, cx: &mut DocContext<'_>) -> Type {
908908
let path = self.path.clean(cx);
909-
resolve_type(cx, path, self.hir_ref_id)
909+
resolve_type(cx, path)
910910
}
911911
}
912912

@@ -1164,7 +1164,7 @@ impl Clean<Item> for ty::AssocItem {
11641164

11651165
fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
11661166
use rustc_hir::GenericParamCount;
1167-
let hir::Ty { hir_id, span, ref kind } = *hir_ty;
1167+
let hir::Ty { hir_id: _, span, ref kind } = *hir_ty;
11681168
let qpath = match kind {
11691169
hir::TyKind::Path(qpath) => qpath,
11701170
_ => unreachable!(),
@@ -1271,7 +1271,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
12711271
return cx.enter_alias(ty_substs, lt_substs, ct_substs, |cx| ty.clean(cx));
12721272
}
12731273
let path = path.clean(cx);
1274-
resolve_type(cx, path, hir_id)
1274+
resolve_type(cx, path)
12751275
}
12761276
hir::QPath::Resolved(Some(ref qself), ref p) => {
12771277
// 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 {
12921292
name: p.segments.last().expect("segments were empty").ident.name,
12931293
self_def_id: Some(DefId::local(qself.hir_id.owner.local_def_index)),
12941294
self_type: Box::new(qself.clean(cx)),
1295-
trait_: Box::new(resolve_type(cx, trait_path, hir_id)),
1295+
trait_: Box::new(resolve_type(cx, trait_path)),
12961296
}
12971297
}
12981298
hir::QPath::TypeRelative(ref qself, ref segment) => {
@@ -1308,7 +1308,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
13081308
name: segment.ident.name,
13091309
self_def_id: res.opt_def_id(),
13101310
self_type: Box::new(qself.clean(cx)),
1311-
trait_: Box::new(resolve_type(cx, trait_path, hir_id)),
1311+
trait_: Box::new(resolve_type(cx, trait_path)),
13121312
}
13131313
}
13141314
hir::QPath::LangItem(..) => bug!("clean: requiring documentation of lang item"),

src/librustdoc/clean/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ crate fn print_const_expr(tcx: TyCtxt<'_>, body: hir::BodyId) -> String {
407407
}
408408

409409
/// Given a type Path, resolve it to a Type using the TyCtxt
410-
crate fn resolve_type(cx: &mut DocContext<'_>, path: Path, id: hir::HirId) -> Type {
411-
debug!("resolve_type({:?},{:?})", path, id);
410+
crate fn resolve_type(cx: &mut DocContext<'_>, path: Path) -> Type {
411+
debug!("resolve_type({:?})", path);
412412

413413
let is_generic = match path.res {
414414
Res::PrimTy(p) => return Primitive(PrimitiveType::from(p)),

0 commit comments

Comments
 (0)