RS.CLIPPY.SAME_NAME_METHOD
Two method with same name
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: same_name_method. Copyright ©2025 The Rust Team. All rights reserved.
What it does
It lints if a struct has two methods with the same name: one from a trait, another not from a trait.
Why restrict this?
Confusing.
Example
trait T {
fn foo(&self) {}
}
struct S;
impl T for S {
fn foo(&self) {}
}
impl S {
fn foo(&self) {}
}