mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: Don't render fieldless discriminant inlay hints for datacarrying enums
This commit is contained in:
parent
9814d79841
commit
14f19c73e9
2 changed files with 48 additions and 27 deletions
|
@ -422,11 +422,9 @@ fn hints(
|
|||
// static type elisions
|
||||
ast::Item::Static(it) => implicit_static::hints(hints, config, Either::Left(it)),
|
||||
ast::Item::Const(it) => implicit_static::hints(hints, config, Either::Right(it)),
|
||||
ast::Item::Enum(it) => discriminant::enum_hints(hints, famous_defs, config, file_id, it),
|
||||
_ => None,
|
||||
},
|
||||
ast::Variant(v) => {
|
||||
discriminant::hints(hints, famous_defs, config, file_id, &v)
|
||||
},
|
||||
// FIXME: fn-ptr type, dyn fn type, and trait object type elisions
|
||||
ast::Type(_) => None,
|
||||
_ => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue