Closed
Description
This program:
#![feature(universal_impl_trait)]
use std::fmt::Debug;
fn foo<T>(x: impl Debug) { }
fn main() {
foo::<String>('a');
}
gives the error:
error[E0089]: too few type parameters provided: expected 2 type parameters, found 1 type parameter
--> src/main.rs:8:5
|
8 | foo::<String>('a');
| ^^^^^^^^^^^^^ expected 2 type parameters
error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position.
--> src/main.rs:8:5
|
8 | foo::<String>('a');
| ^^^^^^^^^^^^^
I would expect just:
error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position.
--> src/main.rs:8:5
|
8 | foo::<String>('a');
| ^^^^^^^^^^^^^