change std::marker::Sized
to just Sized
This commit is contained in:
parent
ee7e717322
commit
b6a3f126c0
25 changed files with 69 additions and 76 deletions
|
@ -252,13 +252,10 @@ pub fn suggest_constraining_type_params<'a>(
|
|||
{
|
||||
let mut sized_constraints =
|
||||
constraints.extract_if(|(_, def_id)| *def_id == tcx.lang_items().sized_trait());
|
||||
if let Some((constraint, def_id)) = sized_constraints.next() {
|
||||
if let Some((_, def_id)) = sized_constraints.next() {
|
||||
applicability = Applicability::MaybeIncorrect;
|
||||
|
||||
err.span_label(
|
||||
param.span,
|
||||
format!("this type parameter needs to be `{}`", constraint),
|
||||
);
|
||||
err.span_label(param.span, "this type parameter needs to be `Sized`");
|
||||
suggest_changing_unsized_bound(generics, &mut suggestions, param, def_id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue