Better error message for object type with GAT
This commit is contained in:
parent
690bcc6619
commit
f8e0dcbf56
3 changed files with 13 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue