We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
struct Foo; trait Bar { fn bar(&self) -> int; } impl Bar for Foo { fn bar(&self) -> int {1} fn bar(&self) -> int {2} } fn main() { printfln!(Foo.bar()) }
$ rustc double-def.rs $ ./double-def 1
The text was updated successfully, but these errors were encountered:
struct Foo; trait Bar { fn bar(&self) -> int; } impl Bar for Foo { fn bar(&self) -> int {1} fn bar(&self) -> int {2} } fn main() { println!("{}",Foo.bar()); }
$ rustc 8153.rs $ ./8153 $ 1
When I tested with this code based on reporter's code, It still shows same result.
Sorry, something went wrong.
I could've sworn I had fixed this in c6f3103 :(
The logic seems to have changed in resolve since then and even though it still seems to catch this case:
impl Bar { fn bar(&self) -> int {1} fn bar(&self) -> int {2} }
The error message got less descriptive: error: duplicate definition of value bar``
error: duplicate definition of value
vs what it used to be: error: duplicate definition of method bar``
error: duplicate definition of method
1607871
No branches or pull requests
The text was updated successfully, but these errors were encountered: