-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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');
| ^^^^^^^^^^^^^
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.