diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-25 05:51:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-25 05:51:10 +0100 |
| commit | c8ede152a522fcf139b35700b36ec3e788617857 (patch) | |
| tree | 6171388fbf6330bb7e09484262d171ecf3c6cda5 /src | |
| parent | cf7041186c047ca329c196d0153abefdccf44d04 (diff) | |
| parent | ce31f68f9e5886959350a85aaad92bc4374c81ab (diff) | |
Rollup merge of #93118 - jackh726:param-heuristics-3, r=estebank
Move param count error emission to end of `check_argument_types` The error emission here isn't exactly what is done in #92364, but replicating that is hard . The general move should make for a smaller diff. Also included the `(usize, Ty, Ty)` to -> `Option<(Ty, Ty)>` commit. r? ``@estebank``
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/mismatched_types/overloaded-calls-bad.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/mismatched_types/overloaded-calls-bad.stderr | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.rs b/src/test/ui/mismatched_types/overloaded-calls-bad.rs index 902a6ec81d6..d62625faaaa 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.rs +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.rs @@ -30,4 +30,5 @@ fn main() { //~^ ERROR this function takes 1 argument but 0 arguments were supplied let ans = s("burma", "shave"); //~^ ERROR this function takes 1 argument but 2 arguments were supplied + //~| ERROR mismatched types } diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index 264d7cbb9b1..9ae9c474162 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -18,6 +18,12 @@ note: associated function defined here LL | extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; | ^^^^^^^^ +error[E0308]: mismatched types + --> $DIR/overloaded-calls-bad.rs:31:17 + | +LL | let ans = s("burma", "shave"); + | ^^^^^^^ expected `isize`, found `&str` + error[E0057]: this function takes 1 argument but 2 arguments were supplied --> $DIR/overloaded-calls-bad.rs:31:15 | @@ -32,7 +38,7 @@ note: associated function defined here LL | extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; | ^^^^^^^^ -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors Some errors have detailed explanations: E0057, E0308. For more information about an error, try `rustc --explain E0057`. |
