From c89e27824f8f30e0c8dd153a9f6bb6a31ddfc65b Mon Sep 17 00:00:00 2001
From: Chris Stankus <cdstankus@gmail.com>
Date: Wed, 3 Aug 2016 18:00:52 -0500
Subject: [PATCH] Update error message for E0109

---
 src/librustc/middle/astconv_util.rs | 6 ++++--
 src/test/compile-fail/E0109.rs      | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/librustc/middle/astconv_util.rs b/src/librustc/middle/astconv_util.rs
index e856eb84ff2c3..f9a05056a7cfd 100644
--- a/src/librustc/middle/astconv_util.rs
+++ b/src/librustc/middle/astconv_util.rs
@@ -24,8 +24,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
     pub fn prohibit_type_params(self, segments: &[ast::PathSegment]) {
         for segment in segments {
             for typ in segment.parameters.types() {
-                span_err!(self.sess, typ.span, E0109,
-                          "type parameters are not allowed on this type");
+                struct_span_err!(self.sess, typ.span, E0109,
+                                 "type parameters are not allowed on this type")
+                    .span_label(typ.span, &format!("type parameter not allowed"))
+                    .emit();
                 break;
             }
             for lifetime in segment.parameters.lifetimes() {
diff --git a/src/test/compile-fail/E0109.rs b/src/test/compile-fail/E0109.rs
index 9fc478422504b..2e4cbf8692693 100644
--- a/src/test/compile-fail/E0109.rs
+++ b/src/test/compile-fail/E0109.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 type X = u32<i32>; //~ ERROR E0109
+                   //~| NOTE type parameter not allowed
 
 fn main() {
 }