Skip to content

Commit

Permalink
Update E0035 to new error format
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 30, 2016
1 parent 9548730 commit d8239e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_typeck/check/method/confirm.rs
Expand Up @@ -312,8 +312,10 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {

if num_supplied_types > 0 && num_supplied_types != num_method_types {
if num_method_types == 0 {
span_err!(self.tcx.sess, self.span, E0035,
"does not take type parameters");
struct_span_err!(self.tcx.sess, self.span, E0035,
"does not take type parameters")
.span_label(self.span, "called with unneeded type parameters")
.emit();
} else {
span_err!(self.tcx.sess, self.span, E0036,
"incorrect number of type parameters given for this method: \
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/E0035.rs
Expand Up @@ -17,4 +17,5 @@ impl Test {
fn main() {
let x = Test;
x.method::<i32>(); //~ ERROR E0035
//~| NOTE called with unneeded type parameters
}

0 comments on commit d8239e3

Please sign in to comment.