Skip to content

Commit a68eae2

Browse files
Avoid InferCtxt::build in generic_arg_mismatch_err
1 parent e3072a2 commit a68eae2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_hir_analysis/src/astconv/generics.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use rustc_hir as hir;
1111
use rustc_hir::def::{DefKind, Res};
1212
use rustc_hir::def_id::DefId;
1313
use rustc_hir::GenericArg;
14-
use rustc_infer::infer::TyCtxtInferExt;
1514
use rustc_middle::ty::{
1615
self, subst, subst::SubstsRef, GenericParamDef, GenericParamDefKind, IsSuggestable, Ty, TyCtxt,
1716
};
@@ -83,9 +82,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
8382
Res::Def(DefKind::TyParam, src_def_id) => {
8483
if let Some(param_local_id) = param.def_id.as_local() {
8584
let param_name = tcx.hir().ty_param_name(param_local_id);
86-
let infcx = tcx.infer_ctxt().build();
87-
let param_type =
88-
infcx.resolve_numeric_literals_with_default(tcx.type_of(param.def_id));
85+
let param_type = tcx.type_of(param.def_id);
8986
if param_type.is_suggestable(tcx, false) {
9087
err.span_suggestion(
9188
tcx.def_span(src_def_id),

0 commit comments

Comments
 (0)