Skip to content

Commit

Permalink
Rollup merge of rust-lang#35412 - chamoysvoice:e0220, r=jonathandturner
Browse files Browse the repository at this point in the history
Update E0220 message to new format

Part of rust-lang#35233 .
Fixes rust-lang#35385.

r? @jonathandturner

Should it keep E0191?
  • Loading branch information
Jonathan Turner authored Aug 7, 2016
2 parents f40b2ff + 0e13b63 commit eb9db9f
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 @@ -1273,10 +1273,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 eb9db9f

Please sign in to comment.