Update E0191 to the new error format
This commit is contained in:
parent
4c02363852
commit
b79e15d32c
@ -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)
|
||||
|
@ -13,6 +13,7 @@ trait Trait {
|
||||
}
|
||||
|
||||
type Foo = Trait; //~ ERROR E0191
|
||||
//~| NOTE missing associated type `Bar` value
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user