1
Fork 0

Don't ICE in new solver when auto traits have associated types

This commit is contained in:
Michael Goulet 2023-06-02 19:21:56 +00:00
parent a9baa16482
commit ecd7809784
4 changed files with 21 additions and 3 deletions

View file

@ -193,10 +193,14 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
}
fn consider_auto_trait_candidate(
_ecx: &mut EvalCtxt<'_, 'tcx>,
ecx: &mut EvalCtxt<'_, 'tcx>,
goal: Goal<'tcx, Self>,
) -> QueryResult<'tcx> {
bug!("auto traits do not have associated types: {:?}", goal);
ecx.tcx().sess.delay_span_bug(
ecx.tcx().def_span(goal.predicate.def_id()),
"associated types not allowed on auto traits",
);
Err(NoSolution)
}
fn consider_trait_alias_candidate(