1 error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds
2 --> $DIR/issue-105227.rs:7:5
4 LL | fn chars0(v :(& str, &str)) -> impl Iterator<Item = char> {
5 | ----- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here
7 LL | v.0.chars().chain(v.1.chars())
8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 help: to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a`
12 LL | fn chars0<'a>(v :(&'a str, &'a str)) -> impl Iterator<Item = char> + 'a {
15 error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds
16 --> $DIR/issue-105227.rs:13:5
18 LL | fn chars1(v0 : & str, v1 : &str) -> impl Iterator<Item = char> {
19 | ----- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here
21 LL | v0.chars().chain(v1.chars())
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 help: to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a`
26 LL | fn chars1<'a>(v0 : &'a str, v1 : &'a str) -> impl Iterator<Item = char> + 'a {
29 error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds
30 --> $DIR/issue-105227.rs:21:5
32 LL | fn chars2<'b>(v0 : &str, v1 : &'_ str, v2 : &'b str) ->
33 | ---- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here
35 LL | (v0.chars().chain(v1.chars()), v2)
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 help: to declare that `impl Iterator<Item = char>` captures `'_`, you can use the named lifetime parameter `'b`
40 LL ~ fn chars2<'b>(v0 : &'b str, v1 : &'b str, v2 : &'b str) ->
42 LL ~ (impl Iterator<Item = char> + 'b , &'b str)
45 error: aborting due to 3 previous errors
47 For more information about this error, try `rustc --explain E0700`.