Suggest correct order for args and constraints

This commit is contained in:
Esteban Küber 2020-03-28 17:45:36 -07:00
parent 33d793c326
commit dcb4e817bc
3 changed files with 68 additions and 0 deletions

View file

@ -5,6 +5,11 @@ LL | pub fn test<W, I: Trait<Item=(), W> >() {}
| ------- ^ generic argument
| |
| the constraint is provided here
|
help: move the constraints after the generic arguments
|
LL | pub fn test<W, I: Trait<W, Item=()> >() {}
| --^^^^^^^
error: aborting due to previous error