As per the question, Let's say I have a following code:
struct Test {
x: i32
}
fn main() {
let test1 = Test { x: 32 }; // type inference by vscode: Test
let test2 = &test1 // type inference by vscode: &Test
let test3 = &test2 // type inference by vscode: &&Test
let explicit_ref: &Test = &test3; // This should give an error but works as I haven't implemented
//Deref trait.
}
Did I miss anything or did I misunderstand automatic dereferencing and deref coercion?