c9a2616e44
This commit adds a test that demonstrates the current behaviour where suggestions to add a dereference aren't given for non-references.
25 lines
665 B
Plaintext
25 lines
665 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/issue-59819.rs:17:18
|
|
|
|
|
LL | let y: i32 = x;
|
|
| ^ expected i32, found struct `Foo`
|
|
|
|
|
= note: expected type `i32`
|
|
found type `Foo`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/issue-59819.rs:19:18
|
|
|
|
|
LL | let b: i32 = a;
|
|
| ^
|
|
| |
|
|
| expected i32, found &{integer}
|
|
| help: consider dereferencing the borrow: `*a`
|
|
|
|
|
= note: expected type `i32`
|
|
found type `&{integer}`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|