Open
Description
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4f2133cbf38d27366a8edd106b5485e5
I expected to see this happen: Same as below, compile pass:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=69e324c356bd126e575a971a7cbbf2fa
Instead, this happened:
error: implementation of `From` is not general enough
--> src/lib.rs:44:9
|
44 | / Box::pin(async move {
45 | | let response = self.send_request(request).await;
46 | | match response {
47 | | Ok(response) => todo!(),
... |
51 | | }
52 | | })
| |__________^ implementation of `From` is not general enough
|
= note: `Box<(dyn std::error::Error + Send + Sync + 'static)>` must implement `From<Box<(dyn std::error::Error + Send + Sync + '0)>>`, for any lifetime `'0`...
= note: ...but it actually implements `From<Box<(dyn std::error::Error + Send + Sync + 'static)>>`
error: could not compile `playground` (lib) due to 1 previous error; 1 warning emitted