fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds 2 --> $DIR/issue-105227.rs:7:5 3 | 4LL | fn chars0(v :(& str, &str)) -> impl Iterator<Item = char> { 5 | ----- -------------------------- opaque type defined here 6 | | 7 | hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here 8LL | 9LL | v.0.chars().chain(v.1.chars()) 10 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 | 12help: to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` 13 | 14LL | fn chars0<'a>(v :(&'a str, &'a str)) -> impl Iterator<Item = char> + 'a { 15 | ++++ ++ ++ ++++ 16 17error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds 18 --> $DIR/issue-105227.rs:13:5 19 | 20LL | fn chars1(v0 : & str, v1 : &str) -> impl Iterator<Item = char> { 21 | ----- -------------------------- opaque type defined here 22 | | 23 | hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here 24LL | 25LL | v0.chars().chain(v1.chars()) 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 27 | 28help: to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` 29 | 30LL | fn chars1<'a>(v0 : &'a str, v1 : &'a str) -> impl Iterator<Item = char> + 'a { 31 | ++++ ++ ++ ++++ 32 33error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds 34 --> $DIR/issue-105227.rs:21:5 35 | 36LL | fn chars2<'b>(v0 : &str, v1 : &'_ str, v2 : &'b str) -> 37 | ---- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here 38LL | 39LL | (impl Iterator<Item = char>, &'b str) 40 | -------------------------- opaque type defined here 41LL | { 42LL | (v0.chars().chain(v1.chars()), v2) 43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 44 | 45help: to declare that `impl Iterator<Item = char>` captures `'_`, you can use the named lifetime parameter `'b` 46 | 47LL ~ fn chars2<'b>(v0 : &'b str, v1 : &'b str, v2 : &'b str) -> 48LL | 49LL ~ (impl Iterator<Item = char> + 'b , &'b str) 50 | 51 52error: aborting due to 3 previous errors 53 54For more information about this error, try `rustc --explain E0700`.