Skip to content

Commit 5519856

Browse files
authored
Merge pull request #268 from ClSlaid/chore/macro/main
refactor(macro): remove compio::main restrictions
2 parents 3780d33 + 877c4a5 commit 5519856

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compio-macros/src/main_fn.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use proc_macro2::{Ident, Span, TokenStream};
1+
use proc_macro2::TokenStream;
22
use quote::{quote, ToTokens, TokenStreamExt};
33
use syn::{parse::Parse, AttrStyle, Attribute, Signature, Visibility};
44

@@ -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)