blob: 4a89238d07e605de576d761c77569cb5b6bbbc45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// edition:2021
use std::iter;
fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
//~^ ERROR: missing generics for struct `Vec` [E0107]
iter::empty()
}
fn g<T>(data: &[T], target: T) -> impl Iterator<Item = Vec<T>> {
f(data).filter(|x| x == target)
}
fn main() {}
|