Surround types with backticks in type errors
This commit is contained in:
parent
94c6425464
commit
6f8f70624b
351 changed files with 1086 additions and 1086 deletions
|
@ -2,7 +2,7 @@ error[E0308]: if and else have incompatible types
|
|||
--> $DIR/str-array-assignment.rs:3:37
|
||||
|
|
||||
LL | let t = if true { s[..2] } else { s };
|
||||
| ------ ^ expected str, found &str
|
||||
| ------ ^ expected `str`, found `&str`
|
||||
| |
|
||||
| expected because of this
|
||||
|
||||
|
@ -12,7 +12,7 @@ error[E0308]: mismatched types
|
|||
LL | let u: &str = if true { s[..2] } else { s };
|
||||
| ^^^^^^
|
||||
| |
|
||||
| expected &str, found str
|
||||
| expected `&str`, found `str`
|
||||
| help: consider borrowing here: `&s[..2]`
|
||||
|
||||
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
||||
|
@ -34,7 +34,7 @@ error[E0308]: mismatched types
|
|||
LL | let w: &str = s[..2];
|
||||
| ^^^^^^
|
||||
| |
|
||||
| expected &str, found str
|
||||
| expected `&str`, found `str`
|
||||
| help: consider borrowing here: `&s[..2]`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue