rust/tests/ui/dyn-compatibility/erroneous_signature.rs

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

18 lines
301 B
Rust
Raw Permalink Normal View History

trait Foo {
fn err(&self) -> MissingType;
//~^ ERROR cannot find type `MissingType` in this scope
}
impl Foo for i32 {
fn err(&self) -> MissingType {
//~^ ERROR cannot find type `MissingType` in this scope
0
}
}
fn coerce(x: &i32) -> &dyn Foo {
x
}
fn main() {}