14 lines
182 B
Rust
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
|
|
}
|