fix: Don't count commas when looking for the derive attribute in diagnostics
This commit is contained in:
parent
d6ed146a1c
commit
8cdef2ffcf
@ -649,6 +649,7 @@ fn emit_def_diagnostic(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, diag:
|
||||
})
|
||||
.group_by(|t| t.kind() == T![,])
|
||||
.into_iter()
|
||||
.filter(|&(comma, _)| !comma)
|
||||
.nth(*derive_index as usize)
|
||||
.and_then(|(_, mut g)| g.find(|t| t.kind() == T![ident]))
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user