mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00

When a `?` operator is used in a tokio entry point function (wrapped in `#[tokio::main]`), which has a Option or Result return type, but where the function does not actually return that type correctly, currently the compiler returns two errors instead of just one. The first of which is incorrect and only exists due to the macro expanding to an async block. ``` cannot use the `?` operator in an async block that returns `()` ``` This commit is a characterization test for this behavior to help show when it's fixed (or even changed for better / worse)
Tests the various combination of feature flags. This is broken out to a separate crate to work around limitations with cargo features.
To run all of the tests in this directory, run the following commands:
cargo test --features full
cargo test --features rt
If any of the tests fail, you can pass TRYBUILD=overwrite
to the cargo test
command that failed to have it regenerate the test output.