Commit graph

8 commits

Author SHA1 Message Date
Esteban Küber
397972f5b0 Separate suggestion in a help and a note 2017-06-04 12:56:57 -07:00
Jonathan Turner
c735d7f2a5 Point arg num mismatch errors back to their definition 2016-12-01 16:33:48 -08:00
Guillaume Gomez
1eda14e4c9 E0060 and E0061 improvement 2016-09-04 01:34:11 +02:00
William Lee
61318156f8 Fixes for issues #35215 and #35216 2016-08-04 00:32:49 -04:00
Esteban Küber
1020e3036b Show types of all args when missing args
When there're missing arguments in a function call, present a list of
all the expected types:

```rust
fn main() {
    t("");
}

fn t(a: &str, x: String) {}
```

```bash
% rustc file.rs
file.rs:3:5: 2:8 error: this function takes 2 parameters but 0
parameters were supplied [E0061]
file.rs:3     t();
              ^~~
file.rs:3:5: 2:8 help: run `rustc --explain E0061` to see a detailed explanation
file.rs:3:5: 2:8 note: the following parameter types were expected: &str, std::string::String
error: aborting due to previous error
```

Fixes #33649
2016-06-15 18:40:11 -07:00
Sean Patrick Santos
b4bbf3a88d Fix ICE that occurs when an associated const is ambiguous.
Also change several error messages to refer to "items" rather than
"methods", since associated items that require resolution during type
checking are not always methods.
2015-05-13 18:10:01 -06:00
Huon Wilson
0c70ce1424 Update compile fail tests to use isize. 2015-01-08 11:02:24 -05:00
Edward Wang
899f222386 Calibrate span for method call error messages
Specifically, the method parameter cardinality mismatch or missing
method error message span now gets method itself exactly. It was the
whole expression.

Closes #9390
Closes #13684
Closes #13709
2014-04-24 06:16:46 +08:00