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

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.
This commit is contained in:
Carl Lerche
2020-01-21 10:46:32 -08:00
committed by GitHub
parent fbe143b142
commit 38bff0adda
9 changed files with 451 additions and 369 deletions
+2 -4
View File
@@ -1,4 +1,2 @@
use doc_comment::doc_comment;
// #[doc = include_str!("../../README.md")]
doc_comment!(include_str!("../../README.md"));
#[cfg(feature = "full")]
doc_comment::doc_comment!(include_str!("../../README.md"));