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

Tests broken under WASM #1015

Closed
mankinskin opened this issue Aug 23, 2020 · 1 comment
Closed

Tests broken under WASM #1015

mankinskin opened this issue Aug 23, 2020 · 1 comment

Comments

@mankinskin
Copy link

mankinskin commented Aug 23, 2020

% cargo test --target=wasm32-unknown-unknown
   Updating crates.io index
  ...
   Compiling reqwest v0.10.7 (/home/linusb/git/reqwest)
error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/badssl.rs:39:3
   |
39 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/badssl.rs:2:3
  |
2 | #[tokio::test]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> examples/form.rs:1:3
  |
1 | #[tokio::main]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/support/server.rs:8:5
  |
8 | use tokio::sync::oneshot;
  |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/support/server.rs:8:5
  |
8 | use tokio::sync::oneshot;
  |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/support/server.rs:8:5
  |
8 | use tokio::sync::oneshot;
  |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/support/server.rs:8:5
  |
8 | use tokio::sync::oneshot;
  |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/support/server.rs:8:5
  |
8 | use tokio::sync::oneshot;
  |     ^^^^^ use of undeclared type or module `tokio`

error[E0432]: unresolved import `tokio`
  --> tests/support/server.rs:11:5
   |
11 | use tokio::runtime;
   |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/proxy.rs:6:3
  |
6 | #[tokio::test]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/proxy.rs:32:3
   |
32 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/proxy.rs:66:3
   |
66 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/proxy.rs:96:3
   |
96 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/proxy.rs:123:3
    |
123 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/proxy.rs:155:3
    |
155 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:16:25
   |
16 |     shutdown_tx: Option<oneshot::Sender<()>>,
   |                         ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:41:25
   |
41 |     F: Fn(http::Request<hyper::Body>) -> Fut + Clone + Send + 'static,
   |                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:42:41
   |
42 |     Fut: Future<Output = http::Response<hyper::Body>> + Send + 'static,
   |                                         ^^^^^ use of undeclared type or module `hyper`

error[E0432]: unresolved import `tokio`
  --> tests/support/server.rs:11:5
   |
11 | use tokio::runtime;
   |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/timeouts.rs:6:3
  |
6 | #[tokio::test]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/timeouts.rs:33:3
   |
33 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/timeouts.rs:61:3
   |
61 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:16:25
   |
16 |     shutdown_tx: Option<oneshot::Sender<()>>,
   |                         ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:41:25
   |
41 |     F: Fn(http::Request<hyper::Body>) -> Fut + Clone + Send + 'static,
   |                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:42:41
   |
42 |     Fut: Future<Output = http::Response<hyper::Body>> + Send + 'static,
   |                                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:13
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:13
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `futures_util`
 --> tests/client.rs:2:5
  |
2 | use futures_util::stream::StreamExt;
  |     ^^^^^^^^^^^^ use of undeclared type or module `futures_util`

error[E0432]: unresolved import `tokio`
  --> tests/support/server.rs:11:5
   |
11 | use tokio::runtime;
   |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/client.rs:7:3
  |
7 | #[tokio::test]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/client.rs:45:3
   |
45 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/client.rs:65:3
   |
65 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/client.rs:83:3
   |
83 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/client.rs:119:3
    |
119 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:16:25
   |
16 |     shutdown_tx: Option<oneshot::Sender<()>>,
   |                         ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:68
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |                                                                    ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:41:25
   |
41 |     F: Fn(http::Request<hyper::Body>) -> Fut + Clone + Send + 'static,
   |                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:42:41
   |
42 |     Fut: Future<Output = http::Response<hyper::Body>> + Send + 'static,
   |                                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:68
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |                                                                    ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:56:45
   |
56 |                         Ok::<_, Infallible>(hyper::service::service_fn(move |req| {
   |                                             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:13
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:56:45
   |
56 |                         Ok::<_, Infallible>(hyper::service::service_fn(move |req| {
   |                                             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:66:42
   |
66 |         let (shutdown_tx, shutdown_rx) = oneshot::channel();
   |                                          ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:68
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |                                                                    ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:66:42
   |
66 |         let (shutdown_tx, shutdown_rx) = oneshot::channel();
   |                                          ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:56:45
   |
56 |                         Ok::<_, Infallible>(hyper::service::service_fn(move |req| {
   |                                             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
 --> tests/timeouts.rs:8:13
  |
8 |     let _ = env_logger::try_init();
  |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:66:42
   |
66 |         let (shutdown_tx, shutdown_rx) = oneshot::channel();
   |                                          ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `futures_util`
 --> tests/multipart.rs:2:5
  |
2 | use futures_util::stream::StreamExt;
  |     ^^^^^^^^^^^^ use of undeclared type or module `futures_util`

error[E0432]: unresolved import `tokio`
  --> tests/support/server.rs:11:5
   |
11 | use tokio::runtime;
   |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/multipart.rs:5:3
  |
5 | #[tokio::test]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:16:25
   |
16 |     shutdown_tx: Option<oneshot::Sender<()>>,
   |                         ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:41:25
   |
41 |     F: Fn(http::Request<hyper::Body>) -> Fut + Clone + Send + 'static,
   |                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:42:41
   |
42 |     Fut: Future<Output = http::Response<hyper::Body>> + Send + 'static,
   |                                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: could not find `Proxy` in `reqwest`
  --> tests/proxy.rs:20:25
   |
20 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
   |                         ^^^^^ not found in `reqwest`
   |
help: consider importing this struct
   |
2  | use js_sys::Proxy;
   |

error[E0433]: failed to resolve: use of undeclared type or module `futures_util`
 --> tests/redirect.rs:2:5
  |
2 | use futures_util::stream::StreamExt;
  |     ^^^^^^^^^^^^ use of undeclared type or module `futures_util`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/redirect.rs:155:9
    |
155 |     use tokio::sync::watch;
    |         ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: could not find `Proxy` in `reqwest`
  --> tests/proxy.rs:51:22
   |
51 |             reqwest::Proxy::http(&proxy)
   |                      ^^^^^ not found in `reqwest`
   |
help: consider importing this struct
   |
2  | use js_sys::Proxy;
   |

error[E0432]: unresolved import `tokio`
  --> tests/support/server.rs:11:5
   |
11 | use tokio::runtime;
   |     ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
 --> tests/redirect.rs:5:3
  |
5 | #[tokio::test]
  |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: could not find `Proxy` in `reqwest`
  --> tests/proxy.rs:84:25
   |
84 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
   |                         ^^^^^ not found in `reqwest`
   |
help: consider importing this struct
   |
2  | use js_sys::Proxy;
   |

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/redirect.rs:42:3
   |
42 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/redirect.rs:78:3
   |
78 | #[tokio::test]
   |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: could not find `Proxy` in `reqwest`
   --> tests/proxy.rs:109:25
    |
109 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
    |                         ^^^^^ not found in `reqwest`
    |
help: consider importing this struct
    |
2   | use js_sys::Proxy;
    |

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/redirect.rs:153:3
    |
153 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/redirect.rs:199:3
    |
199 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: could not find `Proxy` in `reqwest`
   --> tests/proxy.rs:170:25
    |
170 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
    |                         ^^^^^ not found in `reqwest`
    |
help: consider importing this struct
    |
2   | use js_sys::Proxy;
    |

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/redirect.rs:215:3
    |
215 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/redirect.rs:241:3
    |
241 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> tests/redirect.rs:268:3
    |
268 | #[tokio::test]
    |   ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:16:25
   |
16 |     shutdown_tx: Option<oneshot::Sender<()>>,
   |                         ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:13
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:41:25
   |
41 |     F: Fn(http::Request<hyper::Body>) -> Fut + Clone + Send + 'static,
   |                         ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:42:41
   |
42 |     Fut: Future<Output = http::Response<hyper::Body>> + Send + 'static,
   |                                         ^^^^^ use of undeclared type or module `hyper`

error[E0599]: no method named `danger_accept_invalid_certs` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/badssl.rs:42:10
   |
42 |         .danger_accept_invalid_certs(true)
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
  --> tests/client.rs:67:13
   |
67 |     let _ = env_logger::try_init();
   |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:68
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |                                                                    ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:13
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:56:45
   |
56 |                         Ok::<_, Infallible>(hyper::service::service_fn(move |req| {
   |                                             ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:52:68
   |
52 |             hyper::Server::bind(&([127, 0, 0, 1], 0).into()).serve(hyper::service::make_service_fn(
   |                                                                    ^^^^^ use of undeclared type or module `hyper`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
  --> tests/client.rs:85:13
   |
85 |     let _ = env_logger::try_init();
   |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:66:42
   |
66 |         let (shutdown_tx, shutdown_rx) = oneshot::channel();
   |                                          ^^^^^^^ use of undeclared type or module `oneshot`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/support/server.rs:56:45
   |
56 |                         Ok::<_, Infallible>(hyper::service::service_fn(move |req| {
   |                                             ^^^^^ use of undeclared type or module `hyper`

error[E0599]: no method named `no_proxy` found for struct `reqwest::ClientBuilder` in the current scope
 --> tests/badssl.rs:5:10
  |
5 |         .no_proxy()
  |          ^^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
   --> tests/client.rs:121:13
    |
121 |     let _ = env_logger::try_init();
    |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
 --> tests/multipart.rs:7:13
  |
7 |     let _ = env_logger::try_init();
  |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/timeouts.rs:13:13
   |
13 |             tokio::time::delay_for(Duration::from_secs(2)).await;
   |             ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `oneshot`
  --> tests/support/server.rs:66:42
   |
66 |         let (shutdown_tx, shutdown_rx) = oneshot::channel();
   |                                          ^^^^^^^ use of undeclared type or module `oneshot`

error[E0277]: `main` has invalid return type `impl std::future::Future`
 --> examples/form.rs:2:17
  |
2 | async fn main() {
  |                 ^ `main` can only return types that implement `std::process::Termination`
  |
  = help: consider using `()`, or a `Result`

error[E0752]: `main` function is not allowed to be `async`
 --> examples/form.rs:2:1
  |
2 | async fn main() {
  | ^^^^^^^^^^^^^^^ `main` function is not allowed to be `async`

error: could not compile `reqwest`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 3 previous errors

Some errors have detailed explanations: E0277, E0433, E0752.
For more information about an error, try `rustc --explain E0277`.
error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
  --> tests/redirect.rs:80:13
   |
80 |     let _ = env_logger::try_init();
   |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
  --> tests/timeouts.rs:35:13
   |
35 |     let _ = env_logger::try_init();
   |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0282]: type annotations needed
  --> tests/proxy.rs:10:20
   |
10 |         assert_eq!(req.method(), "GET");
   |                    ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0433]: failed to resolve: use of undeclared type or module `watch`
   --> tests/redirect.rs:157:20
    |
157 |     let (tx, rx) = watch::channel(None);
    |                    ^^^^^ use of undeclared type or module `watch`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/timeouts.rs:40:13
   |
40 |             tokio::time::delay_for(Duration::from_secs(2)).await;
   |             ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: could not find `redirect` in `reqwest`
   --> tests/redirect.rs:229:28
    |
229 |         .redirect(reqwest::redirect::Policy::none())
    |                            ^^^^^^^^ could not find `redirect` in `reqwest`

error[E0433]: failed to resolve: use of undeclared type or module `env_logger`
  --> tests/timeouts.rs:63:13
   |
63 |     let _ = env_logger::try_init();
   |             ^^^^^^^^^^ use of undeclared type or module `env_logger`

error[E0282]: type annotations needed
  --> tests/client.rs:10:20
   |
10 |         assert_eq!(req.method(), "GET");
   |                    ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0433]: failed to resolve: use of undeclared type or module `futures_util`
  --> tests/timeouts.rs:68:49
   |
68 |             let body = hyper::Body::wrap_stream(futures_util::stream::once(async {
   |                                                 ^^^^^^^^^^^^ use of undeclared type or module `futures_util`

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
  --> tests/timeouts.rs:69:17
   |
69 |                 tokio::time::delay_for(Duration::from_secs(2)).await;
   |                 ^^^^^ use of undeclared type or module `tokio`

error[E0433]: failed to resolve: use of undeclared type or module `hyper`
  --> tests/timeouts.rs:68:31
   |
68 |             let body = hyper::Body::wrap_stream(futures_util::stream::once(async {
   |                               ^^^^ not found in `hyper`
   |
help: consider importing this struct
   |
2  | use reqwest::Body;
   |

error[E0282]: type annotations needed
  --> tests/redirect.rs:12:16
   |
12 |             if req.method() == "POST" {
   |                ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0599]: no method named `proxy` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/proxy.rs:20:10
   |
20 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
   |          ^^^^^ method not found in `reqwest::ClientBuilder`

error[E0599]: no method named `boundary` found for struct `reqwest::multipart::Form` in the current scope
  --> tests/multipart.rs:18:14
   |
18 |         form.boundary()
   |              ^^^^^^^^ method not found in `reqwest::multipart::Form`

error[E0599]: no method named `boundary` found for struct `reqwest::multipart::Form` in the current scope
  --> tests/multipart.rs:21:63
   |
21 |     let ct = format!("multipart/form-data; boundary={}", form.boundary());
   |                                                               ^^^^^^^^ method not found in `reqwest::multipart::Form`

error[E0599]: no method named `no_proxy` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/client.rs:32:10
   |
32 |         .no_proxy()
   |          ^^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
  --> tests/proxy.rs:36:20
   |
36 |         assert_eq!(req.method(), "GET");
   |                    ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0599]: no method named `proxy` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/proxy.rs:50:10
   |
50 |         .proxy(
   |          ^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
  --> tests/redirect.rs:48:24
   |
48 |             assert_eq!(req.method(), "GET");
   |                        ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0282]: type annotations needed
  --> tests/client.rs:48:20
   |
48 |         assert_eq!(req.headers()["user-agent"], "reqwest-test-agent");
   |                    ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0282]: type annotations needed
  --> tests/proxy.rs:70:20
   |
70 |         assert_eq!(req.method(), "GET");
   |                    ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0599]: no method named `user_agent` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/client.rs:54:10
   |
54 |         .user_agent("reqwest-test-agent")
   |          ^^^^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0599]: no method named `proxy` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/proxy.rs:84:10
   |
84 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
   |          ^^^^^ method not found in `reqwest::ClientBuilder`

error[E0599]: no method named `timeout` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/timeouts.rs:19:10
   |
19 |         .timeout(Duration::from_millis(500))
   |          ^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
  --> tests/proxy.rs:99:20
   |
99 |         assert_eq!(req.method(), "GET");
   |                    ^^^ cannot infer type
   |
   = note: type must be known at this point

error[E0599]: no method named `proxy` found for struct `reqwest::ClientBuilder` in the current scope
   --> tests/proxy.rs:109:10
    |
109 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
    |          ^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
   --> tests/proxy.rs:127:20
    |
127 |         assert_eq!(req.method(), "GET");
    |                    ^^^ cannot infer type
    |
    = note: type must be known at this point

error[E0599]: no method named `timeout` found for struct `reqwest::RequestBuilder` in the current scope
  --> tests/timeouts.rs:51:10
   |
51 |         .timeout(Duration::from_millis(500))
   |          ^^^^^^^ method not found in `reqwest::RequestBuilder`

error: aborting due to 14 previous errors

Some errors have detailed explanations: E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0432`.
error[E0277]: the trait bound `reqwest::Body: std::convert::From<reqwest::Response>` is not satisfied
   --> tests/client.rs:155:10
    |
155 |         .body(res1)
    |          ^^^^ the trait `std::convert::From<reqwest::Response>` is not implemented for `reqwest::Body`
    |
    = help: the following implementations were found:
              <reqwest::Body as std::convert::From<&'static [u8]>>
              <reqwest::Body as std::convert::From<&'static str>>
              <reqwest::Body as std::convert::From<bytes::bytes::Bytes>>
              <reqwest::Body as std::convert::From<std::string::String>>
              <reqwest::Body as std::convert::From<std::vec::Vec<u8>>>
    = note: required because of the requirements on the impl of `std::convert::Into<reqwest::Body>` for `reqwest::Response`

error[E0599]: no method named `timeout` found for struct `reqwest::ClientBuilder` in the current scope
  --> tests/timeouts.rs:78:10
   |
78 |         .timeout(Duration::from_millis(500))
   |          ^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
   --> tests/proxy.rs:160:20
    |
160 |         assert_eq!(req.method(), "GET");
    |                    ^^^ cannot infer type
    |
    = note: type must be known at this point

error[E0282]: type annotations needed
   --> tests/redirect.rs:202:20
    |
202 |         assert_eq!(req.uri(), "/loop");
    |                    ^^^ cannot infer type
    |
    = note: type must be known at this point

error[E0599]: no method named `proxy` found for struct `reqwest::ClientBuilder` in the current scope
   --> tests/proxy.rs:170:10
    |
170 |         .proxy(reqwest::Proxy::http(&proxy).unwrap())
    |          ^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
   --> tests/redirect.rs:218:20
    |
218 |         assert_eq!(req.uri(), "/no-redirect");
    |                    ^^^ cannot infer type
    |
    = note: type must be known at this point

error: aborting due to 23 previous errors

Some errors have detailed explanations: E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0432`.
error: aborting due to 23 previous errors

Some errors have detailed explanations: E0277, E0282, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0277`.
error: aborting due to 31 previous errors

Some errors have detailed explanations: E0282, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0282`.
error[E0599]: no method named `redirect` found for struct `reqwest::ClientBuilder` in the current scope
   --> tests/redirect.rs:229:10
    |
229 |         .redirect(reqwest::redirect::Policy::none())
    |          ^^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
   --> tests/redirect.rs:244:12
    |
244 |         if req.uri() == "/no-refer" {
    |            ^^^ cannot infer type
    |
    = note: type must be known at this point

error[E0599]: no method named `referer` found for struct `reqwest::ClientBuilder` in the current scope
   --> tests/redirect.rs:259:10
    |
259 |         .referer(false)
    |          ^^^^^^^ method not found in `reqwest::ClientBuilder`

error[E0282]: type annotations needed
   --> tests/redirect.rs:274:14
    |
274 |             .body(Default::default())
    |              ^^^^ cannot infer type for type parameter `T` declared on the associated function `body`
    |
help: consider specifying the type argument in the method call
    |
274 |             .body::<T>(Default::default())
    |                  ^^^^^

error: aborting due to 30 previous errors

Some errors have detailed explanations: E0282, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0282`.
error: build failed
@seanmonstar
Copy link
Owner

Yea, this is known. I'd hugely appreciate anyone able to help getting WASM tests working. Original issue here: #657

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

No branches or pull requests

2 participants