Make is_suggestable work on all TypeFoldable
This commit is contained in:
parent
9c47afe9fa
commit
55805ab473
8 changed files with 74 additions and 51 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue