expand/resolve: Turn #[derive]
into a regular macro attribute
This commit is contained in:
parent
ae00b62ceb
commit
dbdbd30bf2
58 changed files with 1499 additions and 1258 deletions
|
@ -1324,6 +1324,14 @@ pub(crate) mod builtin {
|
|||
(false) => {{ /* compiler built-in */ }};
|
||||
}
|
||||
|
||||
/// Attribute macro used to apply derive macros.
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_builtin_macro]
|
||||
pub macro derive($item:item) {
|
||||
/* compiler built-in */
|
||||
}
|
||||
|
||||
/// Attribute macro applied to a function to turn it into a unit test.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow_internal_unstable(test, rustc_attrs)]
|
||||
|
|
|
@ -69,6 +69,11 @@ pub use crate::macros::builtin::{
|
|||
bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,
|
||||
};
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::macros::builtin::derive;
|
||||
|
||||
#[unstable(
|
||||
feature = "cfg_accessible",
|
||||
issue = "64797",
|
||||
|
|
|
@ -54,6 +54,11 @@ pub use core::prelude::v1::{
|
|||
bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,
|
||||
};
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
||||
#[doc(hidden)]
|
||||
pub use core::prelude::v1::derive;
|
||||
|
||||
#[unstable(
|
||||
feature = "cfg_accessible",
|
||||
issue = "64797",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue