// edition:2021 use std::iter; fn f(data: &[T]) -> impl Iterator { //~^ ERROR: missing generics for struct `Vec` [E0107] iter::empty() //~ ERROR: type annotations needed [E0282] } fn g(data: &[T], target: T) -> impl Iterator> { //~^ ERROR: type annotations needed [E0282] f(data).filter(|x| x == target) } fn main() {}