dtolnay / async-trait

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

Ignore nightly's new elided_named_lifetimes lint in generated code #276

Closed dtolnay closed 3 weeks ago

dtolnay commented 3 weeks ago

https://github.com/rust-lang/rust/pull/129207 added this lint:

warning: elided lifetime has a name
    --> tests/test.rs:1118:30
     |
1118 |         async fn f(&self) -> &str
     |                    -         ^ this elided lifetime gets resolved as `'life0`
     |                    |
     |                    lifetime `'life0` declared here
     |
     = note: `#[warn(elided_named_lifetimes)]` on by default

For #[async_trait] this is not useful because the macro needs to give names to some lifetimes which are not named in the user's code.