-
Notifications
You must be signed in to change notification settings - Fork 157
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
[E0061] Refactored argument mismatch error function #2373
Conversation
Should I also add this?
|
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.
LGTM just remove the return statement.
0d8f636
to
ebeda72
Compare
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.
This should be fixed with dg-error.
If not i will take another look when you update the PR. Also take a look at your rust.log output too.
Added Invalid number of arguments (argument mismatch) was passed when calling a function - unexpected number of arguments `x` expected `y` And Refactored error into one function. gcc/rust/ChangeLog: * typecheck/rust-tyty-call.cc (emit_unexpected_argument_error): Refactored invalid number of argument into one function. (TypeCheckCallExpr::visit): called refactored function. (TypeCheckMethodCallExpr::check): likewise. gcc/testsuite/ChangeLog: * rust/compile/func2.rs: updated comment to pass new test cases. * rust/compile/tuple_struct2.rs: likewise. * rust/compile/wrong_no_of_parameters.rs: New test. Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
Argument Mismatch Error-E0061
emit_unexpected_argument_error
.compiler-explorer
:Code Tested:
rust/compile/func2.rs
rust/compile/tuple_struct2.rs
rust/compile/unexpected_arguments.rs
Output:
gcc/rust/ChangeLog:
gcc/testsuite/ChangeLog: