Rollup merge of #35396 - munyari:e0191, r=jonathandturner

Update E0191 to the new error format

Part of #35233

"r? @jonathandturner
This commit is contained in:
Jonathan Turner 2016-08-08 13:25:56 -07:00 committed by GitHub
commit dd38172903
3 changed files with 7 additions and 2 deletions

View file

@ -1201,10 +1201,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) {