Skip to content

Commit 471ed5f

Browse files
committed
Use ItemCtxt::to_ty
1 parent 0fc6756 commit 471ed5f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

compiler/rustc_typeck/src/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl ItemCtxt<'tcx> {
278278
ItemCtxt { tcx, item_def_id }
279279
}
280280

281-
pub fn to_ty(&self, ast_ty: &'tcx hir::Ty<'tcx>) -> Ty<'tcx> {
281+
pub fn to_ty(&self, ast_ty: &hir::Ty<'_>) -> Ty<'tcx> {
282282
AstConv::ast_ty_to_ty(self, ast_ty)
283283
}
284284

compiler/rustc_typeck/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ pub fn hir_ty_to_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'_>) -> Ty<'tcx> {
421421
let env_node_id = tcx.hir().get_parent_item(hir_ty.hir_id);
422422
let env_def_id = tcx.hir().local_def_id(env_node_id);
423423
let item_cx = self::collect::ItemCtxt::new(tcx, env_def_id.to_def_id());
424-
425-
astconv::AstConv::ast_ty_to_ty(&item_cx, hir_ty)
424+
item_cx.to_ty(hir_ty)
426425
}
427426

428427
pub fn hir_trait_to_predicates<'tcx>(

0 commit comments

Comments
 (0)