dtolnay / async-trait

Type erasure for async trait methods
Apache License 2.0
1.81k stars 84 forks source link

Tag the inserted lifetime bounds with the span of the other bounds #191

Closed notriddle closed 2 years ago

notriddle commented 2 years ago

Fixes rust-lang/rust#93828 (which is really a bug in async_trait, not rustc).

Before:

help: consider further restricting this bound
   |
13 |     async fn publish<T + std::marker::Send: IntoUrl>(&self, url: T) -> String {
   |                        +++++++++++++++++++

After:

help: consider further restricting this bound
   |
13 |     async fn publish<T: IntoUrl + std::marker::Send>(&self, url: T) -> String {
   |                                 +++++++++++++++++++