2024-10-10 01:13:29 +02:00

18 lines
240 B
Rust

// Check that static methods render the trait dyn-incompatible.
trait Tr {
fn foo();
fn bar(&self) { }
}
struct St;
impl Tr for St {
fn foo() {}
}
fn main() {
let _: &dyn Tr = &St; //~ ERROR E0038
//~^ ERROR E0038
}