-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for "Macros 1.1" (RFC #1681) #35900
Copy link
Copy link
Closed
Labels
B-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.T-langRelevant to the language teamRelevant to the language teamfinal-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
Metadata
Metadata
Assignees
Labels
B-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.T-langRelevant to the language teamRelevant to the language teamfinal-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Tracking issue for rust-lang/rfcs#1681.
cc @alexcrichton
Stabilization TODO
Litmus tests:
Features:
proc_macroproc-macro#[proc_macro_derive(Foo)]attributeproc-macrocrates with-Land#[macro_use]to load themproc-macro = trueKnown bugs:
mod foofail - Custom derives: TokenStream::from_str fails if the string contains 'mod foo;' #36691proc_macro- Publish docs forproc_macrocrate #38749#[derive]s after other attribute macros and improve intra-#[derive]ordering #37067)Implementation TODO
rustc_macrocratelibrustc_macrolink tolibsyntax. Depend onlibrustc_macroinlibrustc_driverrustc_macroas unstable with our standard header.rustc_macrowith#![crate_type = "rlib"], do not produce a dylib.rustc_macrousinglibsyntax'sTokenStreaminternallyrustc_macrowith aTokenStreamlang item so the compiler knows about it.rustc_macro_deriveattributefoo(bar), no other arguments/formatsTokenStreamlang item added aboverustc_macro_deriveinto metadata along with the derive mode they're used for.rustc-macrocrate type for other cratesrustc-macrocrates cannot be linked as dylibs#[rustc_macro_derive]cfg(rustc_macro)as an unstablecfgdirective, set it for therustc-macrocrate typerustc-macrocrates link dynamically to libsytnax#[macro_use]support forrustc-macrocratesrustc-macrocrates separately from dylib/rlib tracked today when loding cratesrustc-macrocrates to learn about symbol/derive mode pairingsdlopenthe dylibrustc-macrosimilar toplugin = true--crate-type=rustc-macrowhen depending on it#[derive]trait