Advertisement
NLinker

Rust error

Nov 21st, 2019
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 6.17 KB | None | 0 0
  1. error[E0277]: `dyn iml_request_retry::RetryPolicy<reqwest::error::Error>` cannot be sent between threads safely
  2.   --> iml-request-retry/examples/demo-server-client.rs:43:14
  3.    |
  4. 43 |     executor.spawn(async move {
  5.    |              ^^^^^ `dyn iml_request_retry::RetryPolicy<reqwest::error::Error>` cannot be sent between threads safely
  6.    |
  7.    = help: the trait `std::marker::Send` is not implemented for `dyn iml_request_retry::RetryPolicy<reqwest::error::Error>`
  8.    = note: required because of the requirements on the impl of `std::marker::Send` for `&mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>`
  9.    = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22> {&'r std::net::SocketAddr, u32, [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], for<'_> fn([closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32], &mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>) -> impl core::future::future::Future {iml_request_retry::retry_future::<std::string::String, reqwest::error::Error, impl core::future::future::Future, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32]>}, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t5 &'t6 std::net::SocketAddr, client_id:&'t7 u32], [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], &'t8 mut (dyn iml_request_retry::RetryPolicy<reqwest::error::Error> + 't9), &'t10 mut [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], impl core::future::future::Future, impl core::future::future::Future, ()}`
  10.   = note: required because it appears within the type `[static generator@iml-request-retry/examples/demo-server-client.rs:70:96: 78:2 addr:&std::net::SocketAddr, client_id:u32 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22> {&'r std::net::SocketAddr, u32, [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], for<'_> fn([closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32], &mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>) -> impl core::future::future::Future {iml_request_retry::retry_future::<std::string::String, reqwest::error::Error, impl core::future::future::Future, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32]>}, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t5 &'t6 std::net::SocketAddr, client_id:&'t7 u32], [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], &'t8 mut (dyn iml_request_retry::RetryPolicy<reqwest::error::Error> + 't9), &'t10 mut [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], impl core::future::future::Future, impl core::future::future::Future, ()}]`
  11.    = note: required because it appears within the type `std::future::GenFuture<[static generator@iml-request-retry/examples/demo-server-client.rs:70:96: 78:2 addr:&std::net::SocketAddr, client_id:u32 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22> {&'r std::net::SocketAddr, u32, [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], for<'_> fn([closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32], &mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>) -> impl core::future::future::Future {iml_request_retry::retry_future::<std::string::String, reqwest::error::Error, impl core::future::future::Future, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32]>}, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t5 &'t6 std::net::SocketAddr, client_id:&'t7 u32], [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], &'t8 mut (dyn iml_request_retry::RetryPolicy<reqwest::error::Error> + 't9), &'t10 mut [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], impl core::future::future::Future, impl core::future::future::Future, ()}]>`
  12.   = note: required because it appears within the type `impl core::future::future::Future`
  13.   = note: required because it appears within the type `impl core::future::future::Future`
  14.   = note: required because it appears within the type `for<'r, 's, 't0, 't1> {for<'_> fn(&std::net::SocketAddr, u32) -> impl core::future::future::Future {retry_client_obj}, std::net::SocketAddr, &'r std::net::SocketAddr, &'s std::net::SocketAddr, u32, impl core::future::future::Future, impl core::future::future::Future, ()}`
  15.    = note: required because it appears within the type `[static generator@iml-request-retry/examples/demo-server-client.rs:43:31: 45:6 addr:std::net::SocketAddr for<'r, 's, 't0, 't1> {for<'_> fn(&std::net::SocketAddr, u32) -> impl core::future::future::Future {retry_client_obj}, std::net::SocketAddr, &'r std::net::SocketAddr, &'s std::net::SocketAddr, u32, impl core::future::future::Future, impl core::future::future::Future, ()}]`
  16.   = note: required because it appears within the type `std::future::GenFuture<[static generator@iml-request-retry/examples/demo-server-client.rs:43:31: 45:6 addr:std::net::SocketAddr for<'r, 's, 't0, 't1> {for<'_> fn(&std::net::SocketAddr, u32) -> impl core::future::future::Future {retry_client_obj}, std::net::SocketAddr, &'r std::net::SocketAddr, &'s std::net::SocketAddr, u32, impl core::future::future::Future, impl core::future::future::Future, ()}]>`
  17.    = note: required because it appears within the type `impl core::future::future::Future`
  18.  
  19. error: aborting due to previous error
  20.  
  21. For more information about this error, try `rustc --explain E0277`.
  22. error: could not compile `iml-request-retry`.
  23.  
  24. To learn more, run the command again with --verbose.
  25.  
  26. Process finished with exit code 101
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement