rustc_span: Revert addition of proc_macro field to ExpnKind::Macro
The flag has a vague meaning and is used for a single diagnostic change that is low benefit and appears only under `-Z macro_backtrace`.
This commit is contained in:
@@ -811,16 +811,8 @@ impl SyntaxExtension {
|
||||
macro_def_id: Option<DefId>,
|
||||
parent_module: Option<DefId>,
|
||||
) -> ExpnData {
|
||||
use SyntaxExtensionKind::*;
|
||||
let proc_macro = match self.kind {
|
||||
// User-defined proc macro
|
||||
Bang(..) | Attr(..) | Derive(..) => true,
|
||||
// Consider everthing else to be not a proc
|
||||
// macro for diagnostic purposes
|
||||
LegacyBang(..) | LegacyAttr(..) | NonMacroAttr { .. } | LegacyDerive(..) => false,
|
||||
};
|
||||
ExpnData::new(
|
||||
ExpnKind::Macro { kind: self.macro_kind(), name: descr, proc_macro },
|
||||
ExpnKind::Macro(self.macro_kind(), descr),
|
||||
parent,
|
||||
call_site,
|
||||
self.span,
|
||||
|
||||
Reference in New Issue
Block a user