Auto merge of #94711 - ouz-a:master3, r=oli-obk
Return early to fix ICE This fixes #94627, ICE happens because compiler tries to suggest constraining type parameter but the only constraint is implicit `std::Sized` one, so it gets removed and there is nothing to suggest resulting in ICE.
This commit is contained in:
commit
22a20e3f0f
3 changed files with 93 additions and 1 deletions
|
@ -512,7 +512,7 @@ pub fn suggest_constraining_type_params<'a>(
|
|||
};
|
||||
|
||||
err.span_suggestion_verbose(span, msg, suggestion, applicability);
|
||||
} else {
|
||||
} else if suggestions.len() > 1 {
|
||||
err.multipart_suggestion_verbose(
|
||||
"consider restricting type parameters",
|
||||
suggestions.into_iter().map(|(span, suggestion, _)| (span, suggestion)).collect(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue