rust/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed
2023-09-07 04:52:26 +00:00

15 lines
291 B
Rust

// run-rustfix
struct TargetStruct;
impl From<usize> for TargetStruct {
fn from(_unchecked: usize) -> Self {
TargetStruct
}
}
fn main() {
let a = &3;
let _b: TargetStruct = (*a).into(); //~ ERROR the trait bound `TargetStruct: From<&{integer}>` is not satisfied
}