mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-20 04:24:41 +00:00
15 lines
281 B
Rust
15 lines
281 B
Rust
//@ 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() {}
|