]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
Be more careful about unresolved exprs in suggestion
[rust.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:4: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:1: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`.