Update E0191 to the new error format

This commit is contained in:
Panashe M. Fundira 2016-08-05 17:20:47 -04:00
parent 4c02363852
commit b79e15d32c
No known key found for this signature in database
GPG Key ID: ABD6E90F51BF74B5
3 changed files with 7 additions and 2 deletions

View File

@ -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)

View File

@ -13,6 +13,7 @@ trait Trait {
}
type Foo = Trait; //~ ERROR E0191
//~| NOTE missing associated type `Bar` value
fn main() {
}

View File

@ -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) {