//@revisions: current gai //@[current] check-pass #![cfg_attr(gai, feature(generic_arg_infer))] use std::marker::PhantomData; struct Foo(PhantomData); impl Clone for Foo { fn clone(&self) -> Self { Foo(PhantomData) } } impl Copy for Foo {} fn extract(_: [Foo; N]) -> T { loop {} } fn main() { let x = [Foo(PhantomData); 2]; //[gai]~^ ERROR: type annotations needed _ = extract(x).max(2); }