change/uucore_procs ~ add work-around for attribute/macro name collision during testing
proc_macro "main" collides with attribute "#[main]" during testing (for rust < v1.38.0; fixed in v1.38.0+)
ref: GH:rust-lang/rust#62127
+#![allow(dead_code)] // work-around for GH:rust-lang/rust#62127; maint: can be removed when MinSRV >= v1.38.0
+#![allow(unused_macros)] // work-around for GH:rust-lang/rust#62127; maint: can be removed when MinSRV >= v1.38.0
+
extern crate proc_macro;
-// spell-checker:ignore () SIGPIPE uucore uumain uutils
+// spell-checker:ignore () SIGPIPE maint uucore uumain uutils
//## rust proc-macro background info
//* ref: <https://dev.to/naufraghi/procedural-macro-in-rust-101-k3f> @@ <http://archive.is/Vbr5e>
@@ -43,6 +46,7 @@ impl syn::parse::Parse for Tokens {
}
#[proc_macro]
+#[cfg(not(test))] // work-around for GH:rust-lang/rust#62127; maint: can be removed when MinSRV >= v1.38.0
pub fn main(stream: proc_macro::TokenStream) -> proc_macro::TokenStream {
let Tokens { expr } = syn::parse_macro_input!(stream as Tokens);
proc_dbg!(&expr);
