Skip to content

Drop trailing semicolons on item statements #4232

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

Merged
merged 2 commits into from
Jun 6, 2020

Conversation

ayazhafiz
Copy link
Contributor

Per the Rust grammar, trailing semicolons on an item statement may be
optional (i.e. if the statement is a block). Keeping the semicolon in
such cases is unnecessary and may be confusing (does the semicolon
terminate the last statement, or is it an empty statement?), so just
drop it.

Closes #4222

Per the Rust grammar, trailing semicolons on an item statement may be
optional (i.e. if the statement is a block). Keeping the semicolon in
such cases is unnecessary and may be confusing (does the semicolon
terminate the last statement, or is it an empty statement?), so just
drop it.

Closes rust-lang#4222
Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Looks good to me with a minor change to the test file.

@topecongiro topecongiro merged commit d5d008d into rust-lang:master Jun 6, 2020
Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No opinion on the semicolon after items defined within functions?
3 participants