You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then we use it in a binary crate to print "42" to standard output.
110
125
111
-
<!-- ignore: requires external crates -->
112
-
```rust,ignore
113
-
extern crate proc_macro_examples;
114
-
use proc_macro_examples::make_answer;
115
126
116
-
make_answer!();
117
127
118
-
fn main() {
119
-
println!("{}", answer());
120
-
}
121
-
```
122
128
123
129
r[macro.proc.function.invocation]
124
130
Function-like procedural macros may be invoked in any macro invocation position, which includes [statements], [expressions], [patterns], [type expressions], [item] positions, including items in [`extern` blocks], inherent and trait [implementations], and [trait definitions].
0 commit comments