mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Merge #11516
11516: fix: Don't count commas when looking for the derive attribute in diagnostics r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
36f302355b
@ -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…
x
Reference in New Issue
Block a user