提交 f4fdf814 编写于 作者: J Jesus Garlea

Update E0220 error format

squash! Update E0220 error format

Update Error E0220 to new format
上级 1d64acdc
......@@ -1241,10 +1241,12 @@ fn one_bound_for_assoc_type(&self,
-> Result<ty::PolyTraitRef<'tcx>, ErrorReported>
{
if bounds.is_empty() {
span_err!(self.tcx().sess, span, E0220,
struct_span_err!(self.tcx().sess, span, E0220,
"associated type `{}` not found for `{}`",
assoc_name,
ty_param_name);
ty_param_name)
.span_label(span, &format!("associated type `{}` not found", assoc_name))
.emit();
return Err(ErrorReported);
}
......
......@@ -13,7 +13,8 @@ trait Trait {
}
type Foo = Trait<F=i32>; //~ ERROR E0220
//~^ ERROR E0191
//~| NOTE associated type `F` not found
//~| ERROR E0191
//~| NOTE missing associated type `Bar` value
fn main() {
}
......@@ -15,6 +15,7 @@ trait Trait {}
fn f<F:Trait(isize) -> isize>(x: F) {}
//~^ ERROR E0244
//~| NOTE expected no type arguments, found 1
//~| ERROR associated type `Output` not found
//~| ERROR E0220
//~| NOTE associated type `Output` not found
fn main() {}
......@@ -2,7 +2,7 @@ error[E0220]: associated type `Trget` not found for `std::ops::Deref`
--> $DIR/type-binding.rs:16:20
|
16 | fn homura<T: Deref<Trget = i32>>(_: T) {}
| ^^^^^^^^^^^
| ^^^^^^^^^^^ associated type `Trget` not found
error: aborting due to previous error
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册