mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
fix: Fix multiple derives in one attribute not expanding all in expand_macro
This commit is contained in:
parent
3f9f63c1bd
commit
0f3617f76f
6 changed files with 59 additions and 19 deletions
|
@ -246,9 +246,9 @@ impl SourceToDefCtx<'_, '_> {
|
|||
&mut self,
|
||||
item: InFile<&ast::Item>,
|
||||
src: InFile<ast::Attr>,
|
||||
) -> Option<MacroCallId> {
|
||||
) -> Option<&[MacroCallId]> {
|
||||
let map = self.dyn_map(item)?;
|
||||
map[keys::DERIVE_MACRO].get(&src).copied()
|
||||
map[keys::DERIVE_MACRO].get(&src).map(AsRef::as_ref)
|
||||
}
|
||||
|
||||
fn to_def<Ast: AstNode + 'static, ID: Copy + 'static>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue