File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,30 @@ note: trait defined here, with 0 lifetime parameters
22
22
|
23
23
22 | pub trait Trait2 {
24
24
| ^^^^^^
25
+
26
+ error[E0195]: lifetime parameters or bounds on method `method` do not match the trait declaration
27
+ --> tests/ui/lifetime-span.rs:13:14
28
+ |
29
+ 8 | async fn method(&'r self);
30
+ | ---------------- lifetimes in impl do not match this method in trait
31
+ ...
32
+ 13 | async fn method(&self) {}
33
+ | ^^^^^^^^^^^^^ lifetimes do not match method in trait
34
+
35
+ error[E0195]: lifetime parameters or bounds on method `method` do not match the trait declaration
36
+ --> tests/ui/lifetime-span.rs:18:14
37
+ |
38
+ 8 | async fn method(&'r self);
39
+ | ---------------- lifetimes in impl do not match this method in trait
40
+ ...
41
+ 18 | async fn method(&self) {}
42
+ | ^^^^^^^^^^^^^ lifetimes do not match method in trait
43
+
44
+ error[E0195]: lifetime parameters or bounds on method `method` do not match the trait declaration
45
+ --> tests/ui/lifetime-span.rs:33:14
46
+ |
47
+ 23 | async fn method<'r>(&'r self);
48
+ | ---- lifetimes in impl do not match this method in trait
49
+ ...
50
+ 33 | async fn method(&'r self) {}
51
+ | ^^^^^^^^^^^^^^^^ lifetimes do not match method in trait
You can’t perform that action at this time.
0 commit comments