Files
rust/tests/ui/traits/trait-impl-missing-method.rs

14 lines
249 B
Rust
Raw Normal View History

2025-06-03 20:59:42 +05:00
//! 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;
}