librustc_typeck: give more information when supplied wrong number of type-params for methods
This commit is contained in:
parent
5b4986fa57
commit
8bad031190
2 changed files with 4 additions and 2 deletions
|
|
@ -16,7 +16,8 @@ impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah<X>(&self) {} }
|
|||
|
||||
fn main() {
|
||||
10.dup::<i32>(); //~ ERROR does not take type parameters
|
||||
10.blah::<i32, i32>(); //~ ERROR incorrect number of type parameters
|
||||
10.blah::<i32, i32>();
|
||||
//~^ ERROR incorrect number of type parameters given for this method: expected 1, found 2
|
||||
(box 10 as Box<bar>).dup();
|
||||
//~^ ERROR E0038
|
||||
//~| ERROR E0038
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue