Closed
Description
More of a question really as this was surprising to me.
When using Tokio, you can add #[tokio::main]
to any fn and it works as expected, expanding out to eventually calling block_on
on a runtime.
I can see https://github.com/async-rs/async-attributes/blob/master/src/lib.rs#L59 and wondered why this restriction is in place? if there's no technical limitation I will happily send a PR π
Also whilst here, I noticed that since you expect the attribute to always exist on main
, your code doesn't account for visibilty modifiers, eg: pub fn main()
would lose the pub
again, if it's just yet to be built
then I'd love to help out.
Many thanks for your time.
Metadata
Metadata
Assignees
Labels
No labels