summary refs log tree commit diff
path: root/src/libsyntax_ext/proc_macro_registrar.rs
AgeCommit message (Collapse)AuthorLines
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-2/+4
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-6/+6
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-6/+10
2017-02-28Implement function-like procedural macros ( `#[proc_macro]`)Austin Bonander-9/+57
2017-02-05Rename CustomDerive to ProcMacroDerive for macros 1.1Josh Driver-4/+4
2017-01-16Implement `#[proc_macro_attribute]`Austin Bonander-69/+135
* Add support for `#[proc_macro]` * Reactivate `proc_macro` feature and gate `#[proc_macro_attribute]` under it * Have `#![feature(proc_macro)]` imply `#![feature(use_extern_macros)]`, error on legacy import of proc macros via `#[macro_use]`
2017-01-02rustc: Stabilize the `proc_macro` featureAlex Crichton-9/+1
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the compiler to stabilize the "Macros 1.1" feature of the language. Many more details can be found on the tracking issue, #35900. Closes #35900
2016-12-15Require `#[proc_macro_derive]` functions to be `pub`.Jeffrey Seyfried-9/+10
2016-12-06annotate stricter lifetimes on LateLintPass methods to allow them to forward ↵Oliver Schneider-11/+14
to a Visitor
2016-12-02Allow --test to be used on proc-macro cratesJosh Driver-2/+4
2016-11-21Use `Symbol` instead of `InternedString` in the AST, HIR, and various other ↵Jeffrey Seyfried-2/+2
places.
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-9/+9
2016-11-20Refactor `MetaItemKind` to use `Name`s instead of `InternedString`s.Jeffrey Seyfried-8/+7
2016-11-17Show a better error when using --test with #[proc_macro_derive]Josh Driver-0/+9
2016-11-09Rollup merge of #37614 - keeperofdakeys:proc_macro, r=jseyfriedEduard-Mihai Burtescu-15/+52
macros 1.1: Allow proc_macro functions to declare attributes to be mark as used This PR allows proc macro functions to declare attribute names that should be marked as used when attached to the deriving item. There are a few questions for this PR. - Currently this uses a separate attribute named `#[proc_macro_attributes(..)]`, is this the best choice? - In order to make this work, the `check_attribute` function had to be modified to not error on attributes marked as used. This is a pretty large change in semantics, is there a better way to do this? - I've got a few clones where I don't know if I need them (like turning `item` into a `TokenStream`), can these be avoided? - Is switching to `MultiItemDecorator` the right thing here? Also fixes https://github.com/rust-lang/rust/issues/37563.
2016-11-08Allow proc_macro functions to whitelist specific attributesJosh Driver-15/+52
By using a second attribute `attributes(Bar)` on proc_macro_derive, whitelist any attributes with the name `Bar` in the deriving item. This allows a proc_macro function to use custom attribtues without a custom attribute error or unused attribute lint.
2016-11-04Add error when proc_macro_derive is used not on functionsest31-0/+11
Fixes #37590
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-1/+1
2016-10-06rustc: Rename rustc_macro to proc_macroAlex Crichton-0/+277
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`, which reflects the general consensus of #35900. A follow up PR to Cargo will be required to purge the `rustc-macro` name as well.