mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 21:25:25 +00:00
Remove the optimization of builtin attrs in is_inside_macro_call()
`#[cfg_attr]` is a builtin attr, but it may still contain a macro.
This commit is contained in:
parent
6acff6c1f8
commit
cc50868148
1 changed files with 0 additions and 8 deletions
|
|
@ -25,7 +25,6 @@ use hir_expand::{
|
|||
builtin::{BuiltinFnLikeExpander, EagerExpander},
|
||||
db::ExpandDatabase,
|
||||
files::{FileRangeWrapper, HirFileRange, InRealFile},
|
||||
inert_attr_macro::find_builtin_attr_idx,
|
||||
mod_path::{ModPath, PathKind},
|
||||
name::AsName,
|
||||
};
|
||||
|
|
@ -953,13 +952,6 @@ impl<'db> SemanticsImpl<'db> {
|
|||
let Some(item) = ast::Item::cast(ancestor) else {
|
||||
return false;
|
||||
};
|
||||
// Optimization to skip the semantic check.
|
||||
if item.attrs().all(|attr| {
|
||||
attr.simple_name()
|
||||
.is_some_and(|attr| find_builtin_attr_idx(&Symbol::intern(&attr)).is_some())
|
||||
}) {
|
||||
return false;
|
||||
}
|
||||
self.with_ctx(|ctx| {
|
||||
if ctx.item_to_macro_call(token.with_value(&item)).is_some() {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue