Auto merge of #38916 - estebank:pad-suggestion-list, r=nikomatsakis
Teach diagnostics to correct margin of multiline messages
Make the suggestion list have a correct padding:
```
error[E0308]: mismatched types
--> file.rs:3:20
|
3 | let x: usize = "";
| ^^ expected usize, found reference
|
= note: expected type `usize`
= note: found type `&'static str`
= help: here are some functions which might fulfill your needs:
- .len()
- .foo()
- .bar()
```
This commit is contained in:
commit
e57f061be2
4 changed files with 55 additions and 18 deletions
|
|
@ -37,9 +37,9 @@ error[E0308]: mismatched types
|
|||
= note: expected type `()`
|
||||
= note: found type `std::result::Result<bool, std::io::Error>`
|
||||
= help: here are some functions which might fulfill your needs:
|
||||
- .unwrap()
|
||||
- .unwrap_err()
|
||||
- .unwrap_or_default()
|
||||
- .unwrap()
|
||||
- .unwrap_err()
|
||||
- .unwrap_or_default()
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ error[E0308]: mismatched types
|
|||
= note: expected type `usize`
|
||||
= note: found type `std::string::String`
|
||||
= help: here are some functions which might fulfill your needs:
|
||||
- .capacity()
|
||||
- .len()
|
||||
- .capacity()
|
||||
- .len()
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/coerce-suggestions.rs:23:19
|
||||
|
|
@ -19,10 +19,10 @@ error[E0308]: mismatched types
|
|||
= note: expected type `&str`
|
||||
= note: found type `std::string::String`
|
||||
= help: here are some functions which might fulfill your needs:
|
||||
- .as_str()
|
||||
- .trim()
|
||||
- .trim_left()
|
||||
- .trim_right()
|
||||
- .as_str()
|
||||
- .trim()
|
||||
- .trim_left()
|
||||
- .trim_right()
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/coerce-suggestions.rs:30:10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue