rust/tests/ui/closures/issue-111932.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
201 B
Rust
Raw Normal View History

trait Foo: std::fmt::Debug {}
fn print_foos(foos: impl Iterator<Item = dyn Foo>) {
foos.for_each(|foo| { //~ ERROR [E0277]
println!("{:?}", foo); //~ ERROR [E0277]
});
}
fn main() {}