0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-25 04:06:55 +01:00
rust/tests/ui/dyn-compatibility/erroneous_signature.rs
2024-10-10 01:13:29 +02:00

18 lines
301 B
Rust

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() {}