rust/tests/ui/impl-trait/issues/issue-92305.rs

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

15 lines
280 B
Rust
Raw Normal View History

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]
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() {}