Closed
Description
I tried this code:
trait Foo {}
impl Foo for usize {}
fn bar<T: Foo>(_t: impl Foo) -> T {
unimplemented!();
}
fn main() {
bar::<usize>(42);
}
I expected this would give the explicit return value.
Instead, this happened:
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
--> src/main.rs:10:11
|
10 | bar::<usize>(42);
| ^^^^^ explicit generic argument not allowed