Skip to content

Commit c717075

Browse files
committed
Resolve some todos
1 parent 555b2d9 commit c717075

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,13 +747,13 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>(
747747
ty::ClauseKind::RegionOutlives(_)
748748
| ty::ClauseKind::ConstArgHasType(_, _)
749749
| ty::ClauseKind::WellFormed(_)
750+
| ty::ClauseKind::UnstableImpl
750751
| ty::ClauseKind::ConstEvaluatable(_) => {
751752
bug!(
752753
"unexpected non-`Self` predicate when computing \
753754
`{filter:?}` implied bounds: {clause:?}"
754755
);
755756
}
756-
ty::ClauseKind::UnstableImpl => todo!(),
757757
}
758758
}
759759
}
@@ -775,13 +775,13 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>(
775775
| ty::ClauseKind::ConstArgHasType(_, _)
776776
| ty::ClauseKind::WellFormed(_)
777777
| ty::ClauseKind::ConstEvaluatable(_)
778+
| ty::ClauseKind::UnstableImpl
778779
| ty::ClauseKind::HostEffect(..) => {
779780
bug!(
780781
"unexpected non-`Self` predicate when computing \
781782
`{filter:?}` implied bounds: {clause:?}"
782783
);
783784
}
784-
ty::ClauseKind::UnstableImpl => todo!(),
785785
}
786786
}
787787
}

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ fn trait_specialization_kind<'tcx>(
499499
| ty::ClauseKind::ConstArgHasType(..)
500500
| ty::ClauseKind::WellFormed(_)
501501
| ty::ClauseKind::ConstEvaluatable(..)
502+
| ty::ClauseKind::UnstableImpl
502503
| ty::ClauseKind::HostEffect(..) => None,
503-
ty::ClauseKind::UnstableImpl => todo!(),
504504
}
505505
}

compiler/rustc_hir_typeck/src/fn_ctxt/inspect_obligations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
5353
| ty::PredicateKind::Clause(ty::ClauseKind::ConstEvaluatable(..))
5454
| ty::PredicateKind::ConstEquate(..)
5555
| ty::PredicateKind::Clause(ty::ClauseKind::HostEffect(..))
56+
| ty::PredicateKind::Clause(ty::ClauseKind::UnstableImpl)
5657
| ty::PredicateKind::Ambiguous => false,
57-
ty::PredicateKind::Clause(ty::ClauseKind::UnstableImpl) => todo!(),
5858
}
5959
}
6060

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
926926
| ty::ClauseKind::ConstArgHasType(_, _)
927927
| ty::ClauseKind::WellFormed(_)
928928
| ty::ClauseKind::ConstEvaluatable(_)
929+
| ty::ClauseKind::UnstableImpl
929930
| ty::ClauseKind::HostEffect(..) => None,
930-
ty::ClauseKind::UnstableImpl => todo!(),
931931
}
932932
});
933933

compiler/rustc_lint/src/builtin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,8 +1568,9 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
15681568
ClauseKind::TypeOutlives(..) |
15691569
ClauseKind::RegionOutlives(..) => "lifetime",
15701570

1571+
ClauseKind::UnstableImpl
15711572
// `ConstArgHasType` is never global as `ct` is always a param
1572-
ClauseKind::ConstArgHasType(..)
1573+
| ClauseKind::ConstArgHasType(..)
15731574
// Ignore projections, as they can only be global
15741575
// if the trait bound is global
15751576
| ClauseKind::Projection(..)
@@ -1579,7 +1580,6 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
15791580
| ClauseKind::ConstEvaluatable(..)
15801581
// Users don't write this directly, only via another trait ref.
15811582
| ty::ClauseKind::HostEffect(..) => continue,
1582-
ty::ClauseKind::UnstableImpl => todo!(),
15831583
};
15841584
if predicate.is_global() {
15851585
cx.emit_span_lint(

0 commit comments

Comments
 (0)