]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / explicit-generic-args-with-impl-trait / explicit-generic-args-for-impl.stderr
1 error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
2 --> $DIR/explicit-generic-args-for-impl.rs:6:5
3 |
4 LL | foo::<str, String>("".to_string());
5 | ^^^ ------ help: remove this generic argument
6 | |
7 | expected 1 generic argument
8 |
9 note: function defined here, with 1 generic parameter: `T`
10 --> $DIR/explicit-generic-args-for-impl.rs:3:4
11 |
12 LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
13 | ^^^ -
14 = note: `impl Trait` cannot be explicitly specified as a generic argument
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0107`.