Skip to content

Commit

Permalink
Update E0220 message to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
chamoysvoice committed Aug 7, 2016
1 parent b30eff7 commit 0e13b63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,10 +1267,14 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
-> Result<ty::PolyTraitRef<'tcx>, ErrorReported>
{
if bounds.is_empty() {
span_err!(self.tcx().sess, span, E0220,
"associated type `{}` not found for `{}`",
assoc_name,
ty_param_name);
struct_span_err!(self.tcx().sess, span, E0220,
"associated type `{}` not found for `{}`",
assoc_name,
ty_param_name)
.span_label(span, &format!("associated `{}` not found in `{}`",
assoc_name,
ty_param_name))
.emit();
return Err(ErrorReported);
}

Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/E0220.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trait Trait {
}

type Foo = Trait<F=i32>; //~ ERROR E0220
//~| NOTE associated `F` not found in `Trait`
//~^ ERROR E0191

fn main() {
Expand Down

0 comments on commit 0e13b63

Please sign in to comment.