diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-10-09 16:43:57 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-10-15 16:05:31 -0400 |
| commit | 4b69edc19e5a752011d867a2ac6c8d8a58548c07 (patch) | |
| tree | ded2f4c64b41b73340c46b9aa2782649a16cb535 | |
| parent | 5a52983d690bfdc0d0343c1db14c2c6b2359df2d (diff) | |
| download | rust-4b69edc19e5a752011d867a2ac6c8d8a58548c07.tar.gz rust-4b69edc19e5a752011d867a2ac6c8d8a58548c07.zip | |
rename to `user_substs_applied_to_def` for consistency
| -rw-r--r-- | src/librustc_mir/hair/cx/expr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_mir/hair/cx/expr.rs b/src/librustc_mir/hair/cx/expr.rs index c969a3ef348..813400422db 100644 --- a/src/librustc_mir/hair/cx/expr.rs +++ b/src/librustc_mir/hair/cx/expr.rs @@ -759,7 +759,7 @@ fn make_mirror_unadjusted<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>, } } -fn user_annotated_ty_for_def( +fn user_substs_applied_to_def( cx: &mut Cx<'a, 'gcx, 'tcx>, hir_id: hir::HirId, def: &Def, @@ -795,7 +795,7 @@ fn user_annotated_ty_for_def( cx.user_substs_applied_to_ty_of_hir_id(hir_id), _ => - bug!("user_annotated_ty_for_def: unexpected def {:?} at {:?}", def, hir_id) + bug!("user_substs_applied_to_def: unexpected def {:?} at {:?}", def, hir_id) } } @@ -815,7 +815,7 @@ fn method_callee<'a, 'gcx, 'tcx>( .unwrap_or_else(|| { span_bug!(expr.span, "no type-dependent def for method callee") }); - let user_ty = user_annotated_ty_for_def(cx, expr.hir_id, def); + let user_ty = user_substs_applied_to_def(cx, expr.hir_id, def); (def.def_id(), cx.tables().node_substs(expr.hir_id), user_ty) } }; @@ -882,7 +882,7 @@ fn convert_path_expr<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>, Def::StructCtor(_, CtorKind::Fn) | Def::VariantCtor(_, CtorKind::Fn) | Def::SelfCtor(..) => { - let user_ty = user_annotated_ty_for_def(cx, expr.hir_id, &def); + let user_ty = user_substs_applied_to_def(cx, expr.hir_id, &def); ExprKind::Literal { literal: ty::Const::zero_sized( cx.tcx, |
