about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2019-01-24 23:24:58 +0100
committerDavid Wood <david@davidtw.co>2019-01-25 11:15:16 +0100
commit463e623ca967c2bd301cc0291fae219130b53daf (patch)
treee2cbc05116853eed511d4484752ab6e89b4d9ce7 /src/test/ui/parser
parent095b44c83b540bb4dbf74be1cae604f4bae87989 (diff)
Suggestion moving types before associated types.
This commit extends existing suggestions to move lifetimes before types
in generic arguments to also suggest moving types behind associated type
bindings.
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/issue-32214.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/ui/parser/issue-32214.stderr b/src/test/ui/parser/issue-32214.stderr
index a889513eaee..660e517c85a 100644
--- a/src/test/ui/parser/issue-32214.stderr
+++ b/src/test/ui/parser/issue-32214.stderr
@@ -3,6 +3,10 @@ error: type parameters must be declared prior to associated type bindings
    |
 LL | pub fn test<W, I: Trait<Item=(), W> >() {}
    |                                  ^ must be declared prior to associated type bindings
+help: move the type parameter prior to the first associated type binding
+   |
+LL | pub fn test<W, I: Trait<W, Item=()> >() {}
+   |                         ^^       --
 
 error: aborting due to previous error