mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Use Name::missing consistently
This commit is contained in:
parent
c0bb667a7d
commit
1d14fd1737
7 changed files with 33 additions and 52 deletions
|
@ -267,10 +267,7 @@ impl Completions {
|
|||
|
||||
pub(crate) fn add_enum_variant(&mut self, ctx: &CompletionContext, variant: hir::EnumVariant) {
|
||||
let is_deprecated = is_deprecated(variant, ctx.db);
|
||||
let name = match variant.name(ctx.db) {
|
||||
Some(it) => it,
|
||||
None => return,
|
||||
};
|
||||
let name = variant.name(ctx.db);
|
||||
let detail_types = variant.fields(ctx.db).into_iter().map(|field| field.ty(ctx.db));
|
||||
let detail = join(detail_types.map(|t| t.display(ctx.db).to_string()))
|
||||
.separator(", ")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue