mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Simplify
This commit is contained in:
parent
9cb13b6efb
commit
634d588fd7
13 changed files with 137 additions and 176 deletions
|
@ -24,7 +24,7 @@ use hir_def::{
|
|||
};
|
||||
use hir_expand::{
|
||||
name::{AsName, Name},
|
||||
HirFileId, HirFileIdExt,
|
||||
HirFileId, MacroFileIdExt,
|
||||
};
|
||||
use stdx::{always, never};
|
||||
use syntax::{
|
||||
|
@ -196,7 +196,7 @@ impl<'a> DeclValidator<'a> {
|
|||
AttrDefId::GenericParamId(_) => None,
|
||||
}
|
||||
.map_or(false, |file_id| {
|
||||
file_id.is_custom_derive(db.upcast()) || file_id.is_builtin_derive(db.upcast())
|
||||
matches!(file_id.macro_file(), Some(file_id) if file_id.is_custom_derive(db.upcast()) || file_id.is_builtin_derive(db.upcast()))
|
||||
})
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue