The error messages aren't particularly obvious either. For example:
Compiling async-scoped v0.6.0
error[E0433]: failed to resolve: could not find `test` in `async_std`
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/async-scoped-0.6.0/src/tests.rs:5:62
|
5 | #[cfg_attr(feature = "use-async-std", async_std::test)]
| ^^^^ could not find `test` in `async_std`
...
21 | / test_fixtures! {
22 | | async fn test_scope() {
23 | | let not_copy = String::from("hello world!");
24 | | let not_copy_ref = ¬_copy;
... |
291 | | }
292 | | }
| |_- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type `Scope`
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/async-scoped-0.6.0/src/tests.rs:26:36
|
26 | let (stream, _) = unsafe { Scope::scope(|s| {
| ^^^^^ not found in this scope
|
help: consider importing this struct
|
1 | use crate::Scope;
|
It seems like the documentation should specify that having attributes enabled for async-std is a requirement. That feature is not turned on by default.
Sorry, that's my bad. The latest release includes the test module in the build for no reason. I've fixed it in master; will make a new release shortly.
The error messages aren't particularly obvious either. For example:
It seems like the documentation should specify that having
attributes
enabled forasync-std
is a requirement. That feature is not turned on by default.