@@ -22,73 +22,7 @@ help: consider adding an explicit lifetime bound
22
22
LL | type Output<'a> = FooRef<'a, U> where Self: 'a, U: 'a;
23
23
| +++++++
24
24
25
- error[E0309]: the parameter type `T` may not live long enough
26
- --> $DIR/issue-87735.rs:31:15
27
- |
28
- LL | impl<'b, T, U> AsRef2 for Foo<T>
29
- | -- the parameter type `T` must be valid for the lifetime `'b` as defined here...
30
- ...
31
- LL | T: AsRef2<Output<'b> = &'b [U]>,
32
- | ^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
33
- |
34
- note: ...that is required by this bound
35
- --> $DIR/issue-87735.rs:7:31
36
- |
37
- LL | type Output<'a> where Self: 'a;
38
- | ^^
39
- help: consider adding an explicit lifetime bound
40
- |
41
- LL | T: AsRef2<Output<'b> = &'b [U]> + 'b,
42
- | ++++
43
-
44
- error[E0309]: the parameter type `T` may not live long enough
45
- --> $DIR/issue-87735.rs:36:31
46
- |
47
- LL | impl<'b, T, U> AsRef2 for Foo<T>
48
- | -- the parameter type `T` must be valid for the lifetime `'b` as defined here...
49
- ...
50
- LL | fn as_ref2<'a>(&'a self) -> Self::Output<'a> {
51
- | ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
52
- |
53
- note: ...that is required by this bound
54
- --> $DIR/issue-87735.rs:7:31
55
- |
56
- LL | type Output<'a> where Self: 'a;
57
- | ^^
58
- help: consider adding an explicit lifetime bound
59
- |
60
- LL | T: AsRef2<Output<'b> = &'b [U]> + 'b,
61
- | ++++
62
-
63
- error: lifetime may not live long enough
64
- --> $DIR/issue-87735.rs:37:5
65
- |
66
- LL | impl<'b, T, U> AsRef2 for Foo<T>
67
- | -- lifetime `'b` defined here
68
- ...
69
- LL | fn as_ref2<'a>(&'a self) -> Self::Output<'a> {
70
- | -- lifetime `'a` defined here
71
- LL | FooRef(self.0.as_ref2())
72
- | ^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
73
- |
74
- = help: consider adding the following bound: `'b: 'a`
75
-
76
- error: lifetime may not live long enough
77
- --> $DIR/issue-87735.rs:37:12
78
- |
79
- LL | impl<'b, T, U> AsRef2 for Foo<T>
80
- | -- lifetime `'b` defined here
81
- ...
82
- LL | fn as_ref2<'a>(&'a self) -> Self::Output<'a> {
83
- | -- lifetime `'a` defined here
84
- LL | FooRef(self.0.as_ref2())
85
- | ^^^^^^^^^^^^^^^^ argument requires that `'a` must outlive `'b`
86
- |
87
- = help: consider adding the following bound: `'a: 'b`
88
-
89
- help: `'b` and `'a` must be the same: replace one with the other
90
-
91
- error: aborting due to 6 previous errors
25
+ error: aborting due to 2 previous errors
92
26
93
27
Some errors have detailed explanations: E0207, E0309.
94
28
For more information about an error, try `rustc --explain E0207`.
0 commit comments