Make missing impl item suggestions more obvious that they're missing
This commit is contained in:
parent
204c516293
commit
73038d3a64
10 changed files with 41 additions and 51 deletions
|
@ -466,10 +466,10 @@ fn suggestion_signature<'tcx>(
|
|||
assoc,
|
||||
)
|
||||
}
|
||||
ty::AssocKind::Type => format!("type {} = Type;", assoc.name),
|
||||
ty::AssocKind::Type => format!("type {} = /* Type */;", assoc.name),
|
||||
ty::AssocKind::Const => {
|
||||
let ty = tcx.type_of(assoc.def_id).subst_identity();
|
||||
let val = ty_kind_suggestion(ty).unwrap_or("value");
|
||||
let val = ty_kind_suggestion(ty).unwrap_or("todo!()");
|
||||
format!("const {}: {} = {};", assoc.name, ty, val)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue