Files
rust/tests/ui/suggestions/issue-109436.rs
2023-03-22 13:52:24 +08:00

14 lines
182 B
Rust

struct Foo;
struct Bar;
impl From<&Foo> for Bar {
fn from(foo: &Foo) -> Bar {
Bar
}
}
fn main() {
let foo = Foo;
let b: Bar = foo.into(); //~ ERROR E0277
}