rust/tests/ui/suggestions/issue-109436.rs

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

14 lines
182 B
Rust
Raw Normal View History

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
}