mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
feat: add attributes support on struct fields and method #3870
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
18a5e16483
commit
8f1dba6f9a
4 changed files with 30 additions and 43 deletions
|
@ -166,14 +166,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
|
||||
let variant_data = variant_data(db.upcast(), variant_def);
|
||||
|
||||
let lit_fields: FxHashSet<_> = fields
|
||||
.iter()
|
||||
.filter_map(|f| {
|
||||
// TODO: check if cfg_is_enabled with .attrs ?
|
||||
|
||||
Some(&f.name)
|
||||
})
|
||||
.collect();
|
||||
let lit_fields: FxHashSet<_> = fields.iter().map(|f| &f.name).collect();
|
||||
let missed_fields: Vec<Name> = variant_data
|
||||
.fields()
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue