Repository: rust
Issue: Underlining with `~` for missing parameters in long functions overflows the terminal width
Labels: A-diagnostics,T-compiler,A-suggestion-diagnostics,D-papercut,D-verbose

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&code=use%20std%3A%3Acollections%3A%3A%7BBTreeSet%2C%20HashMap%2C%20VecDeque%7D%3B%0Ause%20std%3A%3Async%3A%3A%7BArc%2C%20Mutex%7D%3B%0A%0Afn%20main()%20%7B%0A%20%20%20%20my_very_long_function_name_with_lots_of_args()%3B%0A%7D%0A%0Afn%20my_very_long_function_name_with_lots_of_args(%0A%20%20%20%20_first_long_param%3A%20bool%2C%0A%20%20%20%20_second_long_param%3A%20HashMap%3CArc%3CString%3E%2C%20Vec%3CBTreeSet%3Cusize%3E%3E%3E%2C%0A%20%20%20%20_third_long_param%3A%20usize%2C%0A%20%20%20%20_fourth_long_param%3A%20String%2C%0A%20%20%20%20_fifth_long_param%3A%20Mutex%3COption%3CVecDeque%3CArc%3CString%3E%3E%3E%3E%2C%0A)%20%7B%0A%7D%0A) <!-- Please provide a link to play.rust-lang.org -->

```rust
use std::collections::{BTreeSet, HashMap, VecDeque};
use std::sync::{Arc, Mutex};

fn main() {
    my_very_long_function_name_with_lots_of_args();
}

fn my_very_long_function_name_with_lots_of_args(
    _first_long_param: bool,
    _second_long_param: HashMap<Arc<String>, Vec<BTreeSet<usize>>>,
    _third_long_param: usize,
    _fourth_long_param: String,
    _fifth_long_param: Mutex<Option<VecDeque<Arc<String>>>>,
) {
}

```

The current output is:

```
error[E0061]: this function takes 5 arguments but 0 arguments were supplied
  --> src/main.rs:5:5
   |
5  |     my_very_long_function_name_with_lots_of_args();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- multiple arguments are missing
   |
note: function defined here
  --> src/main.rs:8:4
   |
8  | fn my_very_long_function_name_with_lots_of_args(
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9  |     _first_long_param: bool,
   |     -----------------------
10 |     _second_long_param: HashMap<Arc<String>, Vec<BTreeSet<usize>>>,
   |     --------------------------------------------------------------
11 |     _third_long_param: usize,
   |     ------------------------
12 |     _fourth_long_param: String,
   |     --------------------------
13 |     _fifth_long_param: Mutex<Option<VecDeque<Arc<String>>>>,
   |     -------------------------------------------------------
help: provide the arguments
   |
5  |     my_very_long_function_name_with_lots_of_args(/* bool */, /* std::collections::HashMap<std::sync::Arc<std::string::String>, std::vec::Vec<std::collections::BTreeSet<usize>>> */, /* usize */, /* std::string::String */, /* std::sync::Mutex<std::option::Option<std::collections::VecDeque<std::sync::Arc<std::string::String>>>> */);
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try `rustc --explain E0061`.
error: could not compile `pg2` due to previous error
```

Screenshot:

![Underlining with a tilde '~' takes up two lines because the terminal width is not large enough](https://user-images.githubusercontent.com/7951708/187695671-99af4aa0-dbc2-49a7-b702-4e621d20fe6d.png)

Ideally this could be like the first part, with one parameter on each line ? This would also improve readability of the types I think

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->