mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-14 22:35:11 +00:00
fix: Fix expand_macro always expanding the first listed derive
This commit is contained in:
parent
b494795a42
commit
2e124d15fb
3 changed files with 18 additions and 4 deletions
|
@ -310,7 +310,8 @@ impl HirFileId {
|
|||
}
|
||||
|
||||
/// Return whether this file is the pseudo expansion of the derive attribute.
|
||||
pub fn is_derive_attr_macro(&self, db: &dyn db::AstDatabase) -> bool {
|
||||
/// See [`crate::builtin_attr_macro::derive_attr_expand`].
|
||||
pub fn is_derive_attr_pseudo_expansion(&self, db: &dyn db::AstDatabase) -> bool {
|
||||
match self.0 {
|
||||
HirFileIdRepr::MacroFile(macro_file) => {
|
||||
let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue