-
Notifications
You must be signed in to change notification settings - Fork 541
Open
Labels
A-proc-macroArea: proc-macrosArea: proc-macrosE-EasyWe believe this would not be difficult to actually fixWe believe this would not be difficult to actually fixNew ContentMissing features or aspects of language not currently documented.Missing features or aspects of language not currently documented.
Description
A simple example:
use proc_macro::TokenStream;
#[proc_macro]
fn comptime(_input: TokenStream) -> TokenStream {
"1 + 2".parse().unwrap()
}
fn main() {
println!("1 + 2 = {}", comptime!());
}
This particular example isn't particularly interesting, but I don't know proc macros very well yet :)
Metadata
Metadata
Assignees
Labels
A-proc-macroArea: proc-macrosArea: proc-macrosE-EasyWe believe this would not be difficult to actually fixWe believe this would not be difficult to actually fixNew ContentMissing features or aspects of language not currently documented.Missing features or aspects of language not currently documented.