migrate inferred_outlives_of to Clause
This commit is contained in:
parent
2fa796a3c7
commit
471830b3a4
7 changed files with 21 additions and 29 deletions
|
@ -1984,12 +1984,12 @@ declare_lint_pass!(ExplicitOutlivesRequirements => [EXPLICIT_OUTLIVES_REQUIREMEN
|
|||
|
||||
impl ExplicitOutlivesRequirements {
|
||||
fn lifetimes_outliving_lifetime<'tcx>(
|
||||
inferred_outlives: &'tcx [(ty::ClauseKind<'tcx>, Span)],
|
||||
inferred_outlives: &'tcx [(ty::Clause<'tcx>, Span)],
|
||||
def_id: DefId,
|
||||
) -> Vec<ty::Region<'tcx>> {
|
||||
inferred_outlives
|
||||
.iter()
|
||||
.filter_map(|(clause, _)| match *clause {
|
||||
.filter_map(|(clause, _)| match clause.kind().skip_binder() {
|
||||
ty::ClauseKind::RegionOutlives(ty::OutlivesPredicate(a, b)) => match *a {
|
||||
ty::ReEarlyBound(ebr) if ebr.def_id == def_id => Some(b),
|
||||
_ => None,
|
||||
|
@ -2000,12 +2000,12 @@ impl ExplicitOutlivesRequirements {
|
|||
}
|
||||
|
||||
fn lifetimes_outliving_type<'tcx>(
|
||||
inferred_outlives: &'tcx [(ty::ClauseKind<'tcx>, Span)],
|
||||
inferred_outlives: &'tcx [(ty::Clause<'tcx>, Span)],
|
||||
index: u32,
|
||||
) -> Vec<ty::Region<'tcx>> {
|
||||
inferred_outlives
|
||||
.iter()
|
||||
.filter_map(|(clause, _)| match *clause {
|
||||
.filter_map(|(clause, _)| match clause.kind().skip_binder() {
|
||||
ty::ClauseKind::TypeOutlives(ty::OutlivesPredicate(a, b)) => {
|
||||
a.is_param(index).then_some(b)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue