Removed in_band_lifetimes
from rustc_traits
This commit is contained in:
parent
7ca74ea0af
commit
58a888fcc1
5 changed files with 9 additions and 10 deletions
|
@ -722,7 +722,7 @@ impl<'tcx> chalk_ir::UnificationDatabase<RustInterner<'tcx>> for RustIrDatabase<
|
||||||
/// var bound at index `0`. For types, we use a `BoundVar` index equal to
|
/// var bound at index `0`. For types, we use a `BoundVar` index equal to
|
||||||
/// the type parameter index. For regions, we use the `BoundRegionKind::BrNamed`
|
/// the type parameter index. For regions, we use the `BoundRegionKind::BrNamed`
|
||||||
/// variant (which has a `DefId`).
|
/// variant (which has a `DefId`).
|
||||||
fn bound_vars_for_item(tcx: TyCtxt<'tcx>, def_id: DefId) -> SubstsRef<'tcx> {
|
fn bound_vars_for_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> SubstsRef<'tcx> {
|
||||||
InternalSubsts::for_item(tcx, def_id, |param, substs| match param.kind {
|
InternalSubsts::for_item(tcx, def_id, |param, substs| match param.kind {
|
||||||
ty::GenericParamDefKind::Type { .. } => tcx
|
ty::GenericParamDefKind::Type { .. } => tcx
|
||||||
.mk_ty(ty::Bound(
|
.mk_ty(ty::Bound(
|
||||||
|
|
|
@ -138,7 +138,7 @@ fn compute_implied_outlives_bounds<'tcx>(
|
||||||
/// this down to determine what relationships would have to hold for
|
/// this down to determine what relationships would have to hold for
|
||||||
/// `T: 'a` to hold. We get to assume that the caller has validated
|
/// `T: 'a` to hold. We get to assume that the caller has validated
|
||||||
/// those relationships.
|
/// those relationships.
|
||||||
fn implied_bounds_from_components(
|
fn implied_bounds_from_components<'tcx>(
|
||||||
sub_region: ty::Region<'tcx>,
|
sub_region: ty::Region<'tcx>,
|
||||||
sup_components: SmallVec<[Component<'tcx>; 4]>,
|
sup_components: SmallVec<[Component<'tcx>; 4]>,
|
||||||
) -> Vec<OutlivesBound<'tcx>> {
|
) -> Vec<OutlivesBound<'tcx>> {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
//! the guts are broken up into modules; see the comments in those modules.
|
//! the guts are broken up into modules; see the comments in those modules.
|
||||||
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(in_band_lifetimes)]
|
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ fn try_normalize_after_erasing_regions<'tcx, T: TypeFoldable<'tcx> + PartialEq +
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn not_outlives_predicate(p: &ty::Predicate<'tcx>) -> bool {
|
fn not_outlives_predicate<'tcx>(p: &ty::Predicate<'tcx>) -> bool {
|
||||||
match p.kind().skip_binder() {
|
match p.kind().skip_binder() {
|
||||||
ty::PredicateKind::RegionOutlives(..) | ty::PredicateKind::TypeOutlives(..) => false,
|
ty::PredicateKind::RegionOutlives(..) | ty::PredicateKind::TypeOutlives(..) => false,
|
||||||
ty::PredicateKind::Trait(..)
|
ty::PredicateKind::Trait(..)
|
||||||
|
|
|
@ -70,7 +70,7 @@ struct AscribeUserTypeCx<'me, 'tcx> {
|
||||||
fulfill_cx: &'me mut dyn TraitEngine<'tcx>,
|
fulfill_cx: &'me mut dyn TraitEngine<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AscribeUserTypeCx<'me, 'tcx> {
|
impl<'me, 'tcx> AscribeUserTypeCx<'me, 'tcx> {
|
||||||
fn normalize<T>(&mut self, value: T) -> T
|
fn normalize<T>(&mut self, value: T) -> T
|
||||||
where
|
where
|
||||||
T: TypeFoldable<'tcx>,
|
T: TypeFoldable<'tcx>,
|
||||||
|
@ -195,7 +195,7 @@ fn type_op_eq<'tcx>(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_op_normalize<T>(
|
fn type_op_normalize<'tcx, T>(
|
||||||
infcx: &InferCtxt<'_, 'tcx>,
|
infcx: &InferCtxt<'_, 'tcx>,
|
||||||
fulfill_cx: &mut dyn TraitEngine<'tcx>,
|
fulfill_cx: &mut dyn TraitEngine<'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Normalize<T>>,
|
key: ParamEnvAnd<'tcx, Normalize<T>>,
|
||||||
|
@ -210,28 +210,28 @@ where
|
||||||
Ok(value)
|
Ok(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_op_normalize_ty(
|
fn type_op_normalize_ty<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Ty<'tcx>>>>,
|
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Ty<'tcx>>>>,
|
||||||
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, Ty<'tcx>>>, NoSolution> {
|
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, Ty<'tcx>>>, NoSolution> {
|
||||||
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, type_op_normalize)
|
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, type_op_normalize)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_op_normalize_predicate(
|
fn type_op_normalize_predicate<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Predicate<'tcx>>>>,
|
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Predicate<'tcx>>>>,
|
||||||
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, Predicate<'tcx>>>, NoSolution> {
|
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, Predicate<'tcx>>>, NoSolution> {
|
||||||
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, type_op_normalize)
|
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, type_op_normalize)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_op_normalize_fn_sig(
|
fn type_op_normalize_fn_sig<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<FnSig<'tcx>>>>,
|
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<FnSig<'tcx>>>>,
|
||||||
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, FnSig<'tcx>>>, NoSolution> {
|
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, FnSig<'tcx>>>, NoSolution> {
|
||||||
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, type_op_normalize)
|
tcx.infer_ctxt().enter_canonical_trait_query(&canonicalized, type_op_normalize)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_op_normalize_poly_fn_sig(
|
fn type_op_normalize_poly_fn_sig<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<PolyFnSig<'tcx>>>>,
|
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<PolyFnSig<'tcx>>>>,
|
||||||
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, PolyFnSig<'tcx>>>, NoSolution> {
|
) -> Result<&'tcx Canonical<'tcx, QueryResponse<'tcx, PolyFnSig<'tcx>>>, NoSolution> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue