Surround types with backticks in type errors
This commit is contained in:
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
||||
--> $DIR/const.rs:14:9
|
||||
|
|
||||
LL | FOO => {},
|
||||
| ^^^ expected &Foo, found struct `Foo`
|
||||
| ^^^ expected `&Foo`, found struct `Foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
||||
--> $DIR/lit.rs:7:13
|
||||
|
|
||||
LL | "abc" => true,
|
||||
| ^^^^^ expected &str, found str
|
||||
| ^^^^^ expected `&str`, found `str`
|
||||
|
|
||||
= note: expected type `&&str`
|
||||
found reference `&'static str`
|
||||
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
|
||||
--> $DIR/lit.rs:16:9
|
||||
|
|
||||
LL | b"abc" => true,
|
||||
| ^^^^^^ expected &[u8], found array `[u8; 3]`
|
||||
| ^^^^^^ expected `&[u8]`, found array `[u8; 3]`
|
||||
|
|
||||
= note: expected type `&&[u8]`
|
||||
found reference `&'static [u8; 3]`
|
||||
|
||||
Reference in New Issue
Block a user