Skip to content

Commit e53e0e2

Browse files
committed
chore: remove compio::main restrictions
this should allow it to run on other functions Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
1 parent 3780d33 commit e53e0e2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

compio-macros/src/main_fn.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ impl Parse for CompioMain {
2929
"the `async` keyword is missing from the function declaration",
3030
));
3131
};
32-
if sig.ident != Ident::new("main", Span::call_site()) {
33-
return Err(syn::Error::new_spanned(
34-
sig.ident,
35-
"`compio::main` can only be used for main function.",
36-
));
37-
}
3832

3933
sig.asyncness.take();
4034
Ok(Self(RawBodyItemFn::new(attrs, vis, sig, body)))

0 commit comments

Comments
 (0)