1
Fork 0

Surround types with backticks in type errors

This commit is contained in:
Esteban Küber 2019-11-15 09:37:01 -08:00
parent 94c6425464
commit 6f8f70624b
351 changed files with 1086 additions and 1086 deletions

View file

@ -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