]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr
Be more careful about unresolved exprs in suggestion
[rust.git] / src / test / ui / impl-trait / explicit-generic-args-with-impl-trait / not-enough-args.stderr
1 error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
2   --> $DIR/not-enough-args.rs:4:5
3    |
4 LL |     f::<[u8]>("a", b"a");
5    |     ^   ---- supplied 1 generic argument
6    |     |
7    |     expected 2 generic arguments
8    |
9 note: function defined here, with 2 generic parameters: `T`, `U`
10   --> $DIR/not-enough-args.rs:1:4
11    |
12 LL | fn f<T: ?Sized, U: ?Sized>(_: impl AsRef<T>, _: impl AsRef<U>) {}
13    |    ^ -          -
14 help: add missing generic argument
15    |
16 LL |     f::<[u8], U>("a", b"a");
17    |             +++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0107`.