Closed
Description
use std::fmt::Debug;
// Function that can not be called
fn xxx<A>(x:impl Debug){ println!("Done! {:?}", x) }
// Should an unused type parameter generate an error or warning?
fn yyy<A, B:Debug>(x:B){ println!("Done! {:?}", x) }
fn main(){
// xxx(123u8); //type annotations needed
// xxx::<()>(123u8); //too few type parameters provided: expected 2 type parameters, found 1 type parameter
// xxx::<(), _>(123u8); //cannot provide explicit type parameters when `impl Trait` is used in argument position.
// xxx::<(), u8>(123u8); //cannot provide explicit type parameters when `impl Trait` is used in argument position.
yyy::<(), u8>(123u8);
yyy::<(), _>(123u8);
}