rust/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs

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

15 lines
288 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
}