Remove some glob imports from the type system
This commit is contained in:
@@ -9,7 +9,7 @@ use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan, pluralize, struct_
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir::intravisit::VisitorExt;
|
||||
use rustc_hir::{self as hir, AmbigArg, GenericParamKind, ImplItemKind, intravisit};
|
||||
use rustc_infer::infer::{self, InferCtxt, TyCtxtInferExt};
|
||||
use rustc_infer::infer::{self, BoundRegionConversionTime, InferCtxt, TyCtxtInferExt};
|
||||
use rustc_infer::traits::util;
|
||||
use rustc_middle::ty::error::{ExpectedFound, TypeError};
|
||||
use rustc_middle::ty::{
|
||||
@@ -311,7 +311,7 @@ fn compare_method_predicate_entailment<'tcx>(
|
||||
|
||||
let unnormalized_impl_sig = infcx.instantiate_binder_with_fresh_vars(
|
||||
impl_m_span,
|
||||
infer::HigherRankedType,
|
||||
BoundRegionConversionTime::HigherRankedType,
|
||||
tcx.fn_sig(impl_m.def_id).instantiate_identity(),
|
||||
);
|
||||
|
||||
@@ -518,7 +518,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
|
||||
param_env,
|
||||
infcx.instantiate_binder_with_fresh_vars(
|
||||
return_span,
|
||||
infer::HigherRankedType,
|
||||
BoundRegionConversionTime::HigherRankedType,
|
||||
tcx.fn_sig(impl_m.def_id).instantiate_identity(),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@ use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::lang_items::LangItem;
|
||||
use rustc_hir::{AmbigArg, ItemKind};
|
||||
use rustc_infer::infer::outlives::env::OutlivesEnvironment;
|
||||
use rustc_infer::infer::{self, InferCtxt, TyCtxtInferExt};
|
||||
use rustc_infer::infer::{self, InferCtxt, SubregionOrigin, TyCtxtInferExt};
|
||||
use rustc_lint_defs::builtin::SUPERTRAIT_ITEM_SHADOWING_DEFINITION;
|
||||
use rustc_macros::LintDiagnostic;
|
||||
use rustc_middle::mir::interpret::ErrorHandled;
|
||||
@@ -739,7 +739,7 @@ fn ty_known_to_outlive<'tcx>(
|
||||
infcx.register_type_outlives_constraint_inner(infer::TypeOutlivesConstraint {
|
||||
sub_region: region,
|
||||
sup_type: ty,
|
||||
origin: infer::RelateParamBound(DUMMY_SP, ty, None),
|
||||
origin: SubregionOrigin::RelateParamBound(DUMMY_SP, ty, None),
|
||||
});
|
||||
})
|
||||
}
|
||||
@@ -755,7 +755,11 @@ fn region_known_to_outlive<'tcx>(
|
||||
region_b: ty::Region<'tcx>,
|
||||
) -> bool {
|
||||
test_region_obligations(tcx, id, param_env, wf_tys, |infcx| {
|
||||
infcx.sub_regions(infer::RelateRegionParamBound(DUMMY_SP, None), region_b, region_a);
|
||||
infcx.sub_regions(
|
||||
SubregionOrigin::RelateRegionParamBound(DUMMY_SP, None),
|
||||
region_b,
|
||||
region_a,
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user