rust/tests/ui/traits/suggest-deferences/suggest-dereferencing-receiver-argument.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
291 B
Rust
Raw Normal View History

// 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
}