Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 1 | error[E0726]: implicit elided lifetime not allowed here |
David LeGare | ffb07e7 | 2022-03-01 18:48:27 +0000 | [diff] [blame] | 2 | --> tests/ui/lifetime-span.rs:12:6 |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 3 | | |
| 4 | 12 | impl Trait for A { |
| 5 | | ^^^^^- help: indicate the anonymous lifetime: `<'_>` |
Joel Galenson | aa9cbeb | 2021-08-09 10:24:16 -0700 | [diff] [blame] | 6 | | |
| 7 | = note: assuming a `'static` lifetime... |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 8 | |
| 9 | error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied |
David LeGare | ffb07e7 | 2022-03-01 18:48:27 +0000 | [diff] [blame] | 10 | --> tests/ui/lifetime-span.rs:32:10 |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 11 | | |
| 12 | 32 | impl<'r> Trait2<'r> for B { |
| 13 | | ^^^^^^---- help: remove these generics |
| 14 | | | |
| 15 | | expected 0 lifetime arguments |
| 16 | | |
| 17 | note: trait defined here, with 0 lifetime parameters |
David LeGare | ffb07e7 | 2022-03-01 18:48:27 +0000 | [diff] [blame] | 18 | --> tests/ui/lifetime-span.rs:22:11 |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 19 | | |
| 20 | 22 | pub trait Trait2 { |
| 21 | | ^^^^^^ |
| 22 | |
| 23 | error[E0195]: lifetime parameters or bounds on method `method` do not match the trait declaration |
David LeGare | ffb07e7 | 2022-03-01 18:48:27 +0000 | [diff] [blame] | 24 | --> tests/ui/lifetime-span.rs:13:14 |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 25 | | |
| 26 | 8 | async fn method(&'r self); |
| 27 | | ---------------- lifetimes in impl do not match this method in trait |
| 28 | ... |
| 29 | 13 | async fn method(&self) { } |
| 30 | | ^^^^^^^^^^^^^ lifetimes do not match method in trait |
| 31 | |
| 32 | error[E0195]: lifetime parameters or bounds on method `method` do not match the trait declaration |
David LeGare | ffb07e7 | 2022-03-01 18:48:27 +0000 | [diff] [blame] | 33 | --> tests/ui/lifetime-span.rs:18:14 |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 34 | | |
| 35 | 8 | async fn method(&'r self); |
| 36 | | ---------------- lifetimes in impl do not match this method in trait |
| 37 | ... |
| 38 | 18 | async fn method(&self) { } |
| 39 | | ^^^^^^^^^^^^^ lifetimes do not match method in trait |
| 40 | |
| 41 | error[E0195]: lifetime parameters or bounds on method `method` do not match the trait declaration |
David LeGare | ffb07e7 | 2022-03-01 18:48:27 +0000 | [diff] [blame] | 42 | --> tests/ui/lifetime-span.rs:33:14 |
Joel Galenson | 5448f37 | 2021-04-01 15:10:30 -0700 | [diff] [blame] | 43 | | |
| 44 | 23 | async fn method<'r>(&'r self); |
| 45 | | ---- lifetimes in impl do not match this method in trait |
| 46 | ... |
| 47 | 33 | async fn method(&'r self) { } |
| 48 | | ^^^^^^^^^^^^^^^^ lifetimes do not match method in trait |