implement MacroData
This commit is contained in:
parent
60a50d02ab
commit
0d24405211
5 changed files with 34 additions and 28 deletions
|
@ -658,7 +658,7 @@ impl<'a> Resolver<'a> {
|
|||
res
|
||||
};
|
||||
|
||||
res.map(|res| (self.get_macro(res), res))
|
||||
res.map(|res| (self.get_macro(res).map(|macro_data| macro_data.ext), res))
|
||||
}
|
||||
|
||||
pub(crate) fn finalize_macro_resolutions(&mut self) {
|
||||
|
@ -853,7 +853,7 @@ impl<'a> Resolver<'a> {
|
|||
// Reserve some names that are not quite covered by the general check
|
||||
// performed on `Resolver::builtin_attrs`.
|
||||
if ident.name == sym::cfg || ident.name == sym::cfg_attr {
|
||||
let macro_kind = self.get_macro(res).map(|ext| ext.macro_kind());
|
||||
let macro_kind = self.get_macro(res).map(|macro_data| macro_data.ext.macro_kind());
|
||||
if macro_kind.is_some() && sub_namespace_match(macro_kind, Some(MacroKind::Attr)) {
|
||||
self.session.span_err(
|
||||
ident.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue