mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
c270a42fea
Move verbose logic to a function Minor renaming
13 lines
314 B
Rust
13 lines
314 B
Rust
fn main() {}
|
|
|
|
fn foo(_src: &crate::Foo) -> Option<i32> {
|
|
todo!()
|
|
}
|
|
fn bar(src: &crate::Foo) -> impl Iterator<Item = i32> {
|
|
[0].into_iter()
|
|
//~^ ERROR hidden type for `impl Iterator<Item = i32>` captures lifetime that does not appear in bounds
|
|
.filter_map(|_| foo(src))
|
|
}
|
|
|
|
struct Foo<'a>(&'a str);
|