tokio/tests-build
Josh McKinney c081dfe3ce
macros: characterization tests for ? operator fail (#7069)
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)
2025-01-22 10:55:00 +01:00
..
2019-11-22 14:38:49 -08:00
2024-10-23 18:48:07 +02:00

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.