trait Foo {
type bar;
fn bar();
}
is accepted (though generally considered bad style), but is unimplementable:
impl Foo for () {
type bar = ();
fn bar() {
}
}
gives the error "item bar is an associated method, which doesn't match its trait <() as Foo>"
This seems kinda silly. Allowing this non-conflicting name reuse might be useful for macros as long as procedural macros don't yet exist and concat_idents is useless. Forbidding it outright seems fine, but should be done at the trait definition.
is accepted (though generally considered bad style), but is unimplementable:
gives the error "item
baris an associated method, which doesn't match its trait<() as Foo>"This seems kinda silly. Allowing this non-conflicting name reuse might be useful for macros as long as procedural macros don't yet exist and concat_idents is useless. Forbidding it outright seems fine, but should be done at the trait definition.