We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2af155 commit f2bd4eeCopy full SHA for f2bd4ee
commandeer-macros/src/lib.rs
@@ -106,5 +106,16 @@ pub fn commandeer(args: TokenStream, input: TokenStream) -> TokenStream {
106
107
input_fn.block.stmts = new_stmts;
108
109
+ let body_str = quote!(#input_fn).to_string();
110
+
111
+ if body_str.contains("local_serial_core") {
112
+ return syn::Error::new_spanned(
113
+ input_fn.sig.fn_token,
114
+ "Out of order error. `commandeer` macro must be above the `serial_test` macro.",
115
+ )
116
+ .to_compile_error()
117
+ .into();
118
+ }
119
120
TokenStream::from(quote! { #input_fn })
121
}
0 commit comments