diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e2c7675863e14376915498f4d99be824255c311e --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Proc macro example + +> cargo run --example main + + +To see the result of macro expansion, you need `cargo-expand`. + +> cargo install cargo-expand + +Now you can run: + +> cargo expand --example main > expand_main.rs diff --git a/expand_main.rs b/expand_main.rs new file mode 100644 index 0000000000000000000000000000000000000000..5ad12d0f4155ac952c8631c2c3172743849309d4 --- /dev/null +++ b/expand_main.rs @@ -0,0 +1,7 @@ +#![feature(prelude_import)] +#[prelude_import] +use std::prelude::v1::*; +#[macro_use] +extern crate std; +use d7050e_proc_macro::my_attribute; +fn main() {}