2022-05-01 16:43:17 -05:00
|
|
|
// edition:2021
|
|
|
|
|
|
|
|
use std::iter;
|
|
|
|
|
|
|
|
fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
|
|
|
|
//~^ ERROR: missing generics for struct `Vec` [E0107]
|
2022-11-11 04:29:27 -06:00
|
|
|
iter::empty()
|
2022-05-01 16:43:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn g<T>(data: &[T], target: T) -> impl Iterator<Item = Vec<T>> {
|
|
|
|
f(data).filter(|x| x == target)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|