-> 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);
}
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() {}
--> $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