rust/tests/ui/traits/trait-impl-missing-method.rs
2025-06-04 19:32:06 +05:00

14 lines
249 B
Rust

//! Trait impls must define all required methods.
trait MyTrait {
fn trait_method(&self);
}
struct ImplType;
impl MyTrait for ImplType {} //~ ERROR not all trait items implemented, missing: `trait_method`
fn main() {
let _ = ImplType;
}