rust/tests/ui/traits/final/overriding.rs
mu001999 3572d482a0 Validate no override impl definitions
Co-authored-by: Michael Goulet <michael@errs.io>
2026-02-12 15:18:15 +08:00

12 lines
231 B
Rust

#![feature(final_associated_functions)]
trait Foo {
final fn method() {}
}
impl Foo for () {
fn method() {}
//~^ ERROR cannot override `method` because it already has a `final` definition in the trait
}
fn main() {}