-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)
Description
If there was a #[no_override]
attribute that made it impossible to override a default method, there would be very little need for the FooUtil
traits (with this attribute default methods would have almost exactly the same properties as *Util
, except the seperate trait can be imported separately). i.e.
trait Foo {
fn bar(&self);
#[no_override]
fn call_bar(&self) { self.bar(); }
}
impl Foo for int {
fn bar(&self) {}
fn call_bar(&self) {} // error!
}
This would provide a workaround for #5898 that is a proper solution in its own right.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)