1
Fork 0

Better error message for object type with GAT

This commit is contained in:
Michael Goulet 2023-08-08 20:13:57 +00:00
parent 690bcc6619
commit f8e0dcbf56
3 changed files with 13 additions and 7 deletions

View file

@ -548,7 +548,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
obligation.cause.span,
"GATs in trait object shouldn't have been considered",
);
return Err(SelectionError::Unimplemented);
return Err(SelectionError::TraitNotObjectSafe(trait_predicate.trait_ref.def_id));
}
// This maybe belongs in wf, but that can't (doesn't) handle