Parts of it work fine, but I haven't been able to determine the correct way to call the into method here: https://github.com/mvolkmann/rust-from-into/blob/6cf369e9920f445517599d38e713ce49d84ce1a9/src/main.rs#L60
The error is "mismatched types
expected struct Point3D
found reference &_rustcE0308" but it's not clear to me how to fix this. It seems like I only want to call into on references because I don't want this to transfer ownership.
When I try let p3 = p2.into(); it says "error: type annotations needed". It wants me to specify the type of p3. But when I try let p3: Point3D = p2.into(); it says "error: the trait bound Point3D: From<Point2D> is not satisfied. My code implements the From trait for &Point2D, but not Point2D. It seems like I only want to implement it for &Point2D though.