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
eddyb committed Aug 14, 2016
2 parents 36335a1 + 1c37892 commit 1b324b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,10 +1285,13 @@ 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 type `{}` not found",
assoc_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 type `F` not found
//~^ ERROR E0191

fn main() {
Expand Down

0 comments on commit 1b324b0

Please sign in to comment.