-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
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
[E0592] method or associated functions already defined with same names #2555
Conversation
|
||
rust_error_at ( | ||
r, "multiple candidates found for method %<%s%>", | ||
r, ErrorCode::E0592, "duplicate definitions with name %<%s%>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, not sure which message we should keep here and which error code we should use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep the original error message, as this one could confuse the user since the error will appear on the use site rather than the definition site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
@MahadMuhammad this has merge conflicts can you fix it up? |
@philberty, Sure thing. I'll do it :) |
@MahadMuhammad the tests are failing, once this is fixed I'll merge this |
d5cb245
to
4203600
Compare
…defined gcc/rust/ChangeLog: * typecheck/rust-hir-inherent-impl-overlap.h: Added rich location and errorcode. * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise. gcc/testsuite/ChangeLog: * rust/compile/generics7.rs: Added Errorcode hint. * rust/compile/generics8.rs: Updated dejagnu comment. * rust/compile/issue-925.rs: Added Errorcode hint. Signed-off-by: Muhammad Mahad <[email protected]>
Multiple candidated for
method
orfunction
-E0592
Running testcases:
gcc/testsuite/rust/compile/generics7.rs
gcc/testsuite/rust/compile/issue-925.rs
Output:
gcc/rust/ChangeLog:
gcc/testsuite/ChangeLog: