Skip to content

Commit 128c4e1

Browse files
committed
Resolve some todos
1 parent a7e4512 commit 128c4e1

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
@@ -496,7 +496,7 @@ fn trait_specialization_kind<'tcx>(
496496
| ty::ClauseKind::ConstArgHasType(..)
497497
| ty::ClauseKind::WellFormed(_)
498498
| ty::ClauseKind::ConstEvaluatable(..)
499+
| ty::ClauseKind::UnstableImpl
499500
| ty::ClauseKind::HostEffect(..) => None,
500-
ty::ClauseKind::UnstableImpl => todo!(),
501501
}
502502
}

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
@@ -1561,8 +1561,9 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
15611561
ClauseKind::TypeOutlives(..) |
15621562
ClauseKind::RegionOutlives(..) => "lifetime",
15631563

1564+
ClauseKind::UnstableImpl
15641565
// `ConstArgHasType` is never global as `ct` is always a param
1565-
ClauseKind::ConstArgHasType(..)
1566+
| ClauseKind::ConstArgHasType(..)
15661567
// Ignore projections, as they can only be global
15671568
// if the trait bound is global
15681569
| ClauseKind::Projection(..)
@@ -1572,7 +1573,6 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
15721573
| ClauseKind::ConstEvaluatable(..)
15731574
// Users don't write this directly, only via another trait ref.
15741575
| ty::ClauseKind::HostEffect(..) => continue,
1575-
ty::ClauseKind::UnstableImpl => todo!(),
15761576
};
15771577
if predicate.is_global() {
15781578
cx.emit_span_lint(

0 commit comments

Comments
 (0)