mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
14 lines
249 B
Rust
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;
|
|
}
|