5 // Test that suggestion to add `*` characters applies to implementations of `Deref` as well as
12 impl std::ops::Deref for Foo {
14 fn deref(&self) -> &Self::Target {
19 impl std::ops::Deref for Bar {
21 fn deref(&self) -> &Self::Target {
28 let y: i32 = x; //~ ERROR mismatched types
30 let b: i32 = a; //~ ERROR mismatched types
32 // Do not make a suggestion when adding a `*` wouldn't actually fix the issue:
33 let f = Bar("bar".to_string());
34 let g: String = f; //~ ERROR mismatched types