2022-07-26 06:19:58 +00:00
|
|
|
error[E0700]: hidden type for `impl Trait<'d, 'e>` captures lifetime that does not appear in bounds
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/ordinary-bounds-unrelated.rs:28:33
|
2019-06-01 07:01:49 -04:00
|
|
|
|
|
|
|
|
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
|
2022-02-14 16:10:22 +00:00
|
|
|
| -- hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
|
|
|
|
...
|
|
|
|
LL | if condition() { a } else { b }
|
|
|
|
| ^
|
2019-06-01 07:01:49 -04:00
|
|
|
|
|
2022-10-22 21:38:05 +00:00
|
|
|
help: to declare that `impl Trait<'d, 'e>` captures `'b`, you can add an explicit `'b` lifetime bound
|
2019-06-03 16:31:44 -04:00
|
|
|
|
|
2021-09-25 11:49:14 +00:00
|
|
|
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e> + 'b
|
|
|
|
| ++++
|
2019-06-01 07:01:49 -04:00
|
|
|
|
2022-01-25 16:51:42 +00:00
|
|
|
error: aborting due to previous error
|
2019-06-01 07:01:49 -04:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0700`.
|