fix rebase
This commit is contained in:
parent
cd9743b4d4
commit
825cb5bdc9
4 changed files with 27 additions and 27 deletions
|
@ -16,7 +16,7 @@ pub fn explicit_outlives_bounds<'tcx>(
|
||||||
.caller_bounds()
|
.caller_bounds()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(ty::Predicate::skip_binders)
|
.map(ty::Predicate::skip_binders)
|
||||||
.filter(TypeFoldable::has_escaping_bound_vars)
|
.filter(|atom| !atom.has_escaping_bound_vars())
|
||||||
.filter_map(move |atom| match atom {
|
.filter_map(move |atom| match atom {
|
||||||
ty::PredicateAtom::Projection(..)
|
ty::PredicateAtom::Projection(..)
|
||||||
| ty::PredicateAtom::Trait(..)
|
| ty::PredicateAtom::Trait(..)
|
||||||
|
|
|
@ -1208,8 +1208,6 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
|
||||||
let def_id = cx.tcx.hir().local_def_id(item.hir_id);
|
let def_id = cx.tcx.hir().local_def_id(item.hir_id);
|
||||||
let predicates = cx.tcx.predicates_of(def_id);
|
let predicates = cx.tcx.predicates_of(def_id);
|
||||||
for &(predicate, span) in predicates.predicates {
|
for &(predicate, span) in predicates.predicates {
|
||||||
// We don't actually look inside of the predicate,
|
|
||||||
// so it is safe to skip this binder here.
|
|
||||||
let predicate_kind_name = match predicate.skip_binders() {
|
let predicate_kind_name = match predicate.skip_binders() {
|
||||||
Trait(..) => "Trait",
|
Trait(..) => "Trait",
|
||||||
TypeOutlives(..) |
|
TypeOutlives(..) |
|
||||||
|
|
|
@ -1377,14 +1377,14 @@ impl ToPredicate<'tcx> for PredicateKind<'tcx> {
|
||||||
|
|
||||||
impl ToPredicate<'tcx> for PredicateAtom<'tcx> {
|
impl ToPredicate<'tcx> for PredicateAtom<'tcx> {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn to_predicate(&self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
|
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
|
||||||
debug_assert!(!self.has_escaping_bound_vars(), "excaping bound vars for {:?}", self);
|
debug_assert!(!self.has_escaping_bound_vars(), "excaping bound vars for {:?}", self);
|
||||||
tcx.mk_predicate(ty::PredicateKind::Atom(*self))
|
tcx.mk_predicate(ty::PredicateKind::Atom(self))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<TraitRef<'tcx>> {
|
impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<TraitRef<'tcx>> {
|
||||||
fn to_predicate(&self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
|
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
|
||||||
ty::PredicateAtom::Trait(ty::TraitPredicate { trait_ref: self.value }, self.constness)
|
ty::PredicateAtom::Trait(ty::TraitPredicate { trait_ref: self.value }, self.constness)
|
||||||
.to_predicate(tcx)
|
.to_predicate(tcx)
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,6 +495,8 @@ impl<'a, 'b, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'tcx> {
|
||||||
);
|
);
|
||||||
Err(ErrorHandled::TooGeneric)
|
Err(ErrorHandled::TooGeneric)
|
||||||
}
|
}
|
||||||
|
Err(err) => Err(err),
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Ok(c)
|
Ok(c)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue