I was trying to remove a weird hack I put into rustc, but removing that hack required breaking a diagnostic.
Instead of removing the diagnostic, or adding a new hack to preserve the existing message, I rewrote it and now it's more general 🥰
it now suggests these changes too!
ALT Rust compiler output:
```
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> /home/michael/test.rs:6:5
|
6 | foo("hi", 1, 2, "hi");
| ^^^
|
help: wrap these arguments in a tuple
|
6 | foo("hi", (1, 2), "hi");
| + +
error[E0061]: this function takes 3 arguments but 3 arguments were supplied
--> /home/michael/test.rs:7:5
|
7 | bar("hi", "hi", "hi");
| ^^^
|
help: wrap this argument in a tuple
|
7 | bar("hi", ("hi",), "hi");
| + ++
error: aborting due to 2 previous errors
```
ALT Rust source code:
```
fn foo(s: &str, a: (i32, i32), s2: &str) {}
fn bar(s: &str, a: (&str,), s2: &str) {}
fn main() {
foo("hi", 1, 2, "hi");
bar("hi", "hi", "hi");
}
```