mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
15 lines
292 B
Rust
15 lines
292 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
|
|
}
|