1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
error[E0700]: hidden type for `impl IntoIterator<Item = impl Cap<'a> + Cap<'b>>` captures lifetime that does not appear in bounds
--> $DIR/nested-impl-trait-fail.rs:17:5
|
LL | fn fail_early_bound<'s, 'a, 'b>(a: &'s u8) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b>>
| -- ------------------------------------------------ opaque type defined here
| |
| hidden type `[&'s u8; 1]` captures the lifetime `'s` as defined here
...
LL | [a]
| ^^^
|
help: add a `use<...>` bound to explicitly capture `'s`
|
LL | fn fail_early_bound<'s, 'a, 'b>(a: &'s u8) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b>> + use<'a, 'b, 's>
| +++++++++++++++++
error[E0700]: hidden type for `impl Cap<'a> + Cap<'b>` captures lifetime that does not appear in bounds
--> $DIR/nested-impl-trait-fail.rs:17:5
|
LL | fn fail_early_bound<'s, 'a, 'b>(a: &'s u8) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b>>
| -- ---------------------- opaque type defined here
| |
| hidden type `&'s u8` captures the lifetime `'s` as defined here
...
LL | [a]
| ^^^
|
help: add a `use<...>` bound to explicitly capture `'s`
|
LL | fn fail_early_bound<'s, 'a, 'b>(a: &'s u8) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b> + use<'a, 'b, 's>>
| +++++++++++++++++
error[E0700]: hidden type for `impl IntoIterator<Item = impl Cap<'a> + Cap<'b>>` captures lifetime that does not appear in bounds
--> $DIR/nested-impl-trait-fail.rs:28:5
|
LL | fn fail_late_bound<'s, 'a, 'b>(
| -- hidden type `[&'s u8; 1]` captures the lifetime `'s` as defined here
...
LL | ) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b>> {
| ------------------------------------------------ opaque type defined here
LL | [a]
| ^^^
|
help: add a `use<...>` bound to explicitly capture `'s`
|
LL | ) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b>> + use<'a, 'b, 's> {
| +++++++++++++++++
error[E0700]: hidden type for `impl Cap<'a> + Cap<'b>` captures lifetime that does not appear in bounds
--> $DIR/nested-impl-trait-fail.rs:28:5
|
LL | fn fail_late_bound<'s, 'a, 'b>(
| -- hidden type `&'s u8` captures the lifetime `'s` as defined here
...
LL | ) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b>> {
| ---------------------- opaque type defined here
LL | [a]
| ^^^
|
help: add a `use<...>` bound to explicitly capture `'s`
|
LL | ) -> impl IntoIterator<Item = impl Cap<'a> + Cap<'b> + use<'a, 'b, 's>> {
| +++++++++++++++++
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0700`.
|