Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macros: fix #[tokio::main] without rt-core #2139

Merged
merged 4 commits into from
Jan 21, 2020
Merged

Conversation

carllerche
Copy link
Member

The Tokio runtime provides a "shell" runtime when rt-core is not
available. This shell runtime is enough to support #[tokio::main] and
`#[tokio::test].

A previous change disabled these two attr macros when rt-core was not
selected. This patch fixes this by re-enabling the main and test
attr macros without rt-core and adds some integration tests to prevent
future regressions.

While I was in here, I also moved the entry point macros from lib.rs to
entry.rs. This will add space for future proc macros.

The Tokio runtime provides a "shell" runtime when `rt-core` is not
available. This shell runtime is enough to support `#[tokio::main`] and
`#[tokio::test].

A previous change disabled these two attr macros when `rt-core` was not
selected. This patch fixes this by re-enabling the `main` and `test`
attr macros without `rt-core` and adds some integration tests to prevent
future regressions.
@carllerche carllerche requested review from vorot93, hawkw, taiki-e and LucioFranco and removed request for vorot93 and hawkw January 20, 2020 22:48
Copy link
Member

@vorot93 vorot93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carllerche carllerche merged commit 38bff0a into master Jan 21, 2020
@carllerche carllerche deleted the test-main-macro branch January 23, 2020 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants