fn opaque_type_cycle_error(
tcx: TyCtxt<'_>,
opaque_def_id: LocalDefId,
) -> ErrorGuaranteed
Expand description
Emit an error for recursive opaque types.
If this is a return impl Trait
, find the item’s return expressions and point at them. For
direct recursion this is enough, but for indirect recursion also point at the last intermediary
impl Trait
.
If all the return expressions evaluate to !
, then we explain that the error will go away
after changing it. This can happen when a user uses panic!()
or similar as a placeholder.