]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #40129 - abonander:proc_macro_bang, r=jseyfried
authorCorey Farwell <coreyf@rwell.org>
Thu, 2 Mar 2017 19:53:46 +0000 (14:53 -0500)
committerGitHub <noreply@github.com>
Thu, 2 Mar 2017 19:53:46 +0000 (14:53 -0500)
commitc883f4f584bf55ec3c3d0bbd22957a7e6654e3b9
tree4f88f98fa7272576b878096fd4045c332599a4be
parent0536fd6396133189fb4a41377d3972cd312078a0
parent2fcbb48c727e82ea8751d6476d86fd3c6fe16b42
Rollup merge of #40129 - abonander:proc_macro_bang, r=jseyfried

Implement function-like procedural macros ( `#[proc_macro]`)

Adds the `#[proc_macro]` attribute, which expects bare functions of the kind `fn(TokenStream) -> TokenStream`, which can be invoked like `my_macro!()`.

cc rust-lang/rfcs#1913, #38356

r? @jseyfried
cc @nrc
src/libproc_macro/lib.rs
src/libsyntax/feature_gate.rs