This is (I believe) more a problem/limitation in quote crate, but it affects proc-macro-rules' users.
* repetition compiles on both sides: proc-macro-rules and quote:
pub fn unsafe_fn(input: TokenStream) -> TokenStream {
rules!(input.into() => {
( $f:expr => $( $arg:expr ),* ) => { quote! {
#[deny(unused_unsafe)]
unsafe {
#f(
#(
#arg
),*
)
}
}}
}
But + repetition fails with a confusing error:
Of course, the developer can use + on rules! side, and * on quote side, but when one has narrow vision due to stress.... Suggest a note/example in the docs.
This is (I believe) more a problem/limitation in
quotecrate, but it affectsproc-macro-rules' users.*repetition compiles on both sides:proc-macro-rulesandquote:But
+repetition fails with a confusing error:Of course, the developer can use
+onrules!side, and*onquoteside, but when one has narrow vision due to stress.... Suggest a note/example in the docs.