1
Fork 0

Make is_suggestable work on all TypeFoldable

This commit is contained in:
Michael Goulet 2022-06-05 18:45:45 -07:00
parent 9c47afe9fa
commit 55805ab473
8 changed files with 74 additions and 51 deletions

View file

@ -2509,11 +2509,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
labeled_user_string
);
let pred = format!("{}: {}", bound_kind, sub);
let suggestion = format!(
"{} {}",
generics.add_where_or_trailing_comma(),
pred,
);
let suggestion = format!("{} {}", generics.add_where_or_trailing_comma(), pred,);
err.span_suggestion(
generics.tail_span_for_predicate_suggestion(),
"consider adding a where clause",