Merge #742
742: Only 1 argument in embassy::main when there is no HAL r=Dirbaio a=jbeaurivage There is a slight mistake in an error message from `[embassy::main]` macro. When there is no HAL specified, `main` should take only one argument. Co-authored-by: Justin Beaurivage <justin@wearableavionics.com>
This commit is contained in:
commit
2f43969dd4
@ -42,7 +42,7 @@ pub fn run(args: syn::AttributeArgs, f: syn::ItemFn) -> Result<TokenStream, Toke
|
|||||||
ctxt.error_spanned_by(&f.sig, "main function must have 2 arguments");
|
ctxt.error_spanned_by(&f.sig, "main function must have 2 arguments");
|
||||||
}
|
}
|
||||||
if HAL.is_none() && fargs.len() != 1 {
|
if HAL.is_none() && fargs.len() != 1 {
|
||||||
ctxt.error_spanned_by(&f.sig, "main function must have 2 arguments");
|
ctxt.error_spanned_by(&f.sig, "main function must have 1 argument");
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt.check()?;
|
ctxt.check()?;
|
||||||
|
Loading…
Reference in New Issue
Block a user