Allow #[rustc_builtin_macro = "name"].
This makes it possible to have both std::panic and core::panic as a builtin macro, by using different builtin macro names for each. Also removes SyntaxExtension::is_derive_copy, as the macro name (e.g. sym::Copy) is now tracked and provides that information directly.
This commit is contained in:
parent
1f9dc9a182
commit
d651fa78ce
5 changed files with 11 additions and 15 deletions
|
@ -48,7 +48,7 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand, edition: Editi
|
|||
let mut register = |name, kind| {
|
||||
resolver.register_builtin_macro(
|
||||
Ident::with_dummy_span(name),
|
||||
SyntaxExtension { is_builtin: true, ..SyntaxExtension::default(kind, edition) },
|
||||
SyntaxExtension { builtin_name: Some(name), ..SyntaxExtension::default(kind, edition) },
|
||||
)
|
||||
};
|
||||
macro register_bang($($name:ident: $f:expr,)*) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue