Closed
Description
struct Foo<T>(T);
struct A;
struct B;
impl Foo<A> {
fn foo() {}
}
impl Foo<B> {
fn foo() {}
}
fn main() {}
produces duplicate definition error for foo
:
test.rs:9:2: 9:13 error: duplicate definition of value `foo`
test.rs:9 fn foo() {}
^~~~~~~~~~~
test.rs:6:2: 6:13 note: first definition of value `foo` here
test.rs:6 fn foo() {}
^~~~~~~~~~~
error: aborting due to previous error
Since Foo<A>
and Foo<B>
are different types, it seems that their impls should not be interfering with each other.
Metadata
Metadata
Assignees
Labels
No labels