mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 22:24:14 +00:00
Diagnose unresolved attribute proc-macros
This commit is contained in:
parent
7d51fc4640
commit
1d34cdcac0
1 changed files with 13 additions and 1 deletions
|
@ -1138,7 +1138,19 @@ impl DefCollector<'_> {
|
||||||
|
|
||||||
let def = match resolver(path.clone()) {
|
let def = match resolver(path.clone()) {
|
||||||
Some(def) if def.is_attribute() => def,
|
Some(def) if def.is_attribute() => def,
|
||||||
_ => return true,
|
_ => {
|
||||||
|
self.def_map.diagnostics.push(DefDiagnostic::unresolved_proc_macro(
|
||||||
|
directive.module_id,
|
||||||
|
MacroCallKind::Attr {
|
||||||
|
ast_id,
|
||||||
|
attr_args: Default::default(),
|
||||||
|
invoc_attr_index: attr.id.ast_index,
|
||||||
|
is_derive: false,
|
||||||
|
},
|
||||||
|
self.proc_macro_err.clone(),
|
||||||
|
));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if matches!(
|
if matches!(
|
||||||
def,
|
def,
|
||||||
|
|
Loading…
Reference in a new issue