-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Replace unused bindings with anonymous binding in lower/testdata. #6479
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
Replace unused bindings with anonymous binding in lower/testdata. #6479
Conversation
danakj
left a comment
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.
Thanks, this looks good, just a few suggestions to keep the srtucture of tests/reduce additional names
danakj
left a comment
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.
Thanks, LGTM
| fn M() -> i32 { | ||
| var n: i32 = 0; | ||
| var m: i32; | ||
|
|
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.
Restoring this newline should reduce the amount of changes in the semir
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
48c0b17 to
3744cb3
Compare
|
As discussed, pulled changes from trunk (with --rebase). |
This updates lower/testdata to use _ instead of proper names, in order to avoid the "unused binding" warnings from #2022 which are being implemented. These changes do not depend on the implementation which should make everything easier to review.
See #6460 with part 1 of the implementation. It was split upon request in order to make reviewing easier, the original state of the PR was updating hundreds of test cases.
The PR has thus been split, part 2 including test cases changes can be viewed at https://github.com/burakemir/carbon-lang/tree/unused_pattern_bindings_p2022_impl_part2 ... many tests need to be updated, so it seems best to get those tests out of the way that are not interesting.
These are not all tests in lower/testdata - a few of them are interesting in the sense that they cannot use '_' because it leads to failed redeclaration check. This is exactly the scenario described in #3763 which requires the 'unused' marker. Those are left untouched here but are updated in https://github.com/burakemir/carbon-lang/tree/unused_pattern_bindings_p2022_impl_part2