about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPanashe M. Fundira <fundirap@gmail.com>2016-08-05 17:20:47 -0400
committerPanashe M. Fundira <fundirap@gmail.com>2016-08-06 16:35:57 -0400
commitb79e15d32c4cd14b4428d1b05a16a7d2234490cc (patch)
tree7f3d03f69bba8081edcdc199477a98e4c0d52c8d /src
parent4c02363852e6ce41cf2da1b43a32cb7780a9b067 (diff)
downloadrust-b79e15d32c4cd14b4428d1b05a16a7d2234490cc.tar.gz
rust-b79e15d32c4cd14b4428d1b05a16a7d2234490cc.zip
Update E0191 to the new error format
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/astconv.rs7
-rw-r--r--src/test/compile-fail/E0191.rs1
-rw-r--r--src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs1
3 files changed, 7 insertions, 2 deletions
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 3b2bca4ab39..388f2fb53e6 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1194,10 +1194,13 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
         }
 
         for (trait_def_id, name) in associated_types {
-            span_err!(tcx.sess, span, E0191,
+            struct_span_err!(tcx.sess, span, E0191,
                 "the value of the associated type `{}` (from the trait `{}`) must be specified",
                         name,
-                        tcx.item_path_str(trait_def_id));
+                        tcx.item_path_str(trait_def_id))
+                        .span_label(span, &format!(
+                            "missing associated type `{}` value", name))
+                        .emit();
         }
 
         tcx.mk_trait(object.principal, object.bounds)
diff --git a/src/test/compile-fail/E0191.rs b/src/test/compile-fail/E0191.rs
index 489ebb033f8..dcfe441ab0d 100644
--- a/src/test/compile-fail/E0191.rs
+++ b/src/test/compile-fail/E0191.rs
@@ -13,6 +13,7 @@ trait Trait {
 }
 
 type Foo = Trait; //~ ERROR E0191
+                  //~| NOTE missing associated type `Bar` value
 
 fn main() {
 }
diff --git a/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs b/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
index 2b34fcab24c..007f1d3a294 100644
--- a/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
+++ b/src/test/compile-fail/associated-type-projection-from-multiple-supertraits.rs
@@ -37,6 +37,7 @@ fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
     //~| ERROR the value of the associated type `Color` (from the trait `Vehicle`) must be specified
     //~| NOTE could derive from `Vehicle`
     //~| NOTE could derive from `Box`
+    //~| NOTE missing associated type `Color` value
 }
 
 fn paint<C:BoxCar>(c: C, d: C::Color) {