summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/issues/issue-92305.rs
blob: 1518c116b318571573629d1979540cdc8c5fdec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// edition:2021

use std::iter;

fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
    //~^ ERROR: missing generics for struct `Vec` [E0107]
    iter::empty() //~ ERROR: type annotations needed [E0282]
}

fn g<T>(data: &[T], target: T) -> impl Iterator<Item = Vec<T>> {
    //~^ ERROR: type annotations needed [E0282]
    f(data).filter(|x| x == target)
}

fn main() {}