about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-01-11 21:45:24 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-01-11 21:45:24 -0800
commitde3c4be099993517dba7bb764628ff28e86f9320 (patch)
tree77ef89394fffd17a2c169f7629c5549b571586cf /src/libsyntax/parse/parser.rs
parent8119017746959f7ecb3ba93c6c32a7d6d9dafc40 (diff)
downloadrust-de3c4be099993517dba7bb764628ff28e86f9320.tar.gz
rust-de3c4be099993517dba7bb764628ff28e86f9320.zip
Tweak type argument after assoc type error
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 6228598ab61..a5ef4038885 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5360,8 +5360,15 @@ impl<'a> Parser<'a> {
                 // Parse type argument.
                 let ty_param = self.parse_ty()?;
                 if seen_binding {
-                    self.span_err(ty_param.span,
-                        "type parameters must be declared prior to associated type bindings");
+                    self.struct_span_err(
+                        ty_param.span,
+                        "type parameters must be declared prior to associated type bindings"
+                    )
+                        .span_label(
+                            ty_param.span,
+                            "must be declared prior to associated type bindings",
+                        )
+                        .emit();
                 }
                 args.push(GenericArg::Type(ty_param));
                 seen_type = true;