Update E0035 to new error format
This commit is contained in:
parent
954873055a
commit
d8239e3e59
@ -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: \
|
||||
|
@ -17,4 +17,5 @@ impl Test {
|
||||
fn main() {
|
||||
let x = Test;
|
||||
x.method::<i32>(); //~ ERROR E0035
|
||||
//~| NOTE called with unneeded type parameters
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user