Rollup merge of #70519 - estebank:constraints-before-args-spans, r=Centril

Tweak output of type params and constraints in the wrong order

r? @Centril @varkor
This commit is contained in:
Mazdak Farrokhzad
2020-04-06 04:24:15 +02:00
committed by GitHub
8 changed files with 146 additions and 61 deletions

View File

@@ -4,7 +4,12 @@ error: generic arguments must come before the first constraint
LL | pub fn test<W, I: Trait<Item=(), W> >() {}
| ------- ^ generic argument
| |
| the first constraint is provided here
| constraint
|
help: move the constraint after the generic argument
|
LL | pub fn test<W, I: Trait<W, Item = ()> >() {}
| ^^^^^^^^^^^^^^
error: aborting due to previous error