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

Remove semicolon note #46258

Merged
merged 10 commits into from Nov 28, 2017

Conversation

Projects
None yet
5 participants
@colinmarsh19
Contributor

colinmarsh19 commented Nov 25, 2017

In reference to issue #46186
r? @estebank

First time doing a pull request, if there are any suggestions on how to improve this please let me know.
@jjolly

colinmarsh19 added some commits Nov 25, 2017

Remove semicolon note
Added note that specifies a semicolon should be removed after a given struct
@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Nov 25, 2017

Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Collaborator

rust-highfive commented Nov 25, 2017

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@estebank

Looks good to me, a couple of nitpicks inline. r=me once they're taken care of.

Show outdated Hide outdated src/test/parse-fail/issue-46186.rs Outdated
Show outdated Hide outdated src/libsyntax/parse/parser.rs Outdated

colinmarsh19 added some commits Nov 26, 2017

@colinmarsh19

This comment has been minimized.

Show comment
Hide comment
@colinmarsh19

colinmarsh19 Nov 26, 2017

Contributor

r? @estebank

Don't know why the builds are failing, I've tested them on my local branch and they seem to be working just fine. If you have any tips to help out lmk.

Contributor

colinmarsh19 commented Nov 26, 2017

r? @estebank

Don't know why the builds are failing, I've tested them on my local branch and they seem to be working just fine. If you have any tips to help out lmk.

@estebank

This comment has been minimized.

Show comment
Hide comment
@estebank

estebank Nov 26, 2017

Contributor

This file doesn't end in .rs, so I don't think this is being tested.

Contributor

estebank commented on src/test/ui/issue-46186 in 4779899 Nov 26, 2017

This file doesn't end in .rs, so I don't think this is being tested.

@estebank

This comment has been minimized.

Show comment
Hide comment
@estebank

estebank Nov 26, 2017

Contributor

The complaint from the test was

[00:53:55] unexpected errors (from JSON output): [
[00:53:55]     Error {
[00:53:55]         line_num: 15,
[00:53:55]         kind: Some(
[00:53:55]             Error
[00:53:55]         ),
[00:53:55]         msg: "15:2: 15:3: expected item, found `;`"
[00:53:55]     }
[00:53:55] ]
[00:53:55] 
[00:53:55] not found errors (from test file): [
[00:53:55]     Error {
[00:53:55]         line_num: 15,
[00:53:55]         kind: Some(
[00:53:55]             Error
[00:53:55]         ),
[00:53:55]         msg: "expected item, found \';\'"
[00:53:55]     },
[00:53:55]     Error {
[00:53:55]         line_num: 15,
[00:53:55]         kind: Some(
[00:53:55]             Note
[00:53:55]         ),
[00:53:55]         msg: "consider removing the semicolon"
[00:53:55]     }

Which means that the suggestion wasn't being emitted and that there was a typo in the error message parsing. For the second, you can get away with keeping only the beginning of the text for it to match without having to worry about special characters.

Contributor

estebank commented Nov 26, 2017

The complaint from the test was

[00:53:55] unexpected errors (from JSON output): [
[00:53:55]     Error {
[00:53:55]         line_num: 15,
[00:53:55]         kind: Some(
[00:53:55]             Error
[00:53:55]         ),
[00:53:55]         msg: "15:2: 15:3: expected item, found `;`"
[00:53:55]     }
[00:53:55] ]
[00:53:55] 
[00:53:55] not found errors (from test file): [
[00:53:55]     Error {
[00:53:55]         line_num: 15,
[00:53:55]         kind: Some(
[00:53:55]             Error
[00:53:55]         ),
[00:53:55]         msg: "expected item, found \';\'"
[00:53:55]     },
[00:53:55]     Error {
[00:53:55]         line_num: 15,
[00:53:55]         kind: Some(
[00:53:55]             Note
[00:53:55]         ),
[00:53:55]         msg: "consider removing the semicolon"
[00:53:55]     }

Which means that the suggestion wasn't being emitted and that there was a typo in the error message parsing. For the second, you can get away with keeping only the beginning of the text for it to match without having to worry about special characters.

colinmarsh19 added some commits Nov 26, 2017

@estebank

This comment has been minimized.

Show comment
Hide comment
@estebank

estebank Nov 26, 2017

Contributor

@bors r+ rollup

Contributor

estebank commented Nov 26, 2017

@bors r+ rollup

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 26, 2017

Contributor

📌 Commit 096e698 has been approved by estebank

Contributor

bors commented Nov 26, 2017

📌 Commit 096e698 has been approved by estebank

kennytm added a commit to kennytm/rust that referenced this pull request Nov 27, 2017

Rollup merge of rust-lang#46258 - colinmarsh19:master, r=estebank
Remove semicolon note

In reference to issue rust-lang#46186
r? @estebank

First time doing a pull request, if there are any suggestions on how to improve this please let me know.
@jjolly

bors added a commit that referenced this pull request Nov 27, 2017

Auto merge of #46312 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #45506, #46174, #46231, #46240, #46249, #46258, #46262, #46275, #46282, #46285
- Failed merges:

bors added a commit that referenced this pull request Nov 27, 2017

Auto merge of #46312 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #45506, #46174, #46231, #46240, #46249, #46258, #46262, #46275, #46282, #46285
- Failed merges:

@bors bors merged commit 096e698 into rust-lang:master Nov 28, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

zackmdavis added a commit to zackmdavis/rust that referenced this pull request Jun 30, 2018

clarify why we're suggesting removing semicolon after braced items
Previously (issue rust-lang#46186, pull-request rust-lang#46258), a suggestion was added
to remove the semicolon after we fail to parse an item, but issue rust-lang#51603
complains that it's still insufficiently obvious why. Let's add a note.

Resolves rust-lang#51603.

zackmdavis added a commit to zackmdavis/rust that referenced this pull request Jun 30, 2018

clarify why we're suggesting removing semicolon after braced items
Previously (issue rust-lang#46186, pull-request rust-lang#46258), a suggestion was added
to remove the semicolon after we fail to parse an item, but issue rust-lang#51603
complains that it's still insufficiently obvious why. Let's add a note.

Resolves rust-lang#51603.

bors added a commit that referenced this pull request Jul 8, 2018

Auto merge of #51955 - zackmdavis:item_semi, r=oli-obk
clarify why we're suggesting removing semicolon after braced items

Previously (issue #46186, pull-request #46258), a suggestion was added
to remove the semicolon after we fail to parse an item, but issue #51603
complains that it's still insufficiently obvious why. Let's add a note.

Resolves #51603.

mati865 added a commit to mati865/rust that referenced this pull request Jul 24, 2018

clarify why we're suggesting removing semicolon after braced items
Previously (issue rust-lang#46186, pull-request rust-lang#46258), a suggestion was added
to remove the semicolon after we fail to parse an item, but issue rust-lang#51603
complains that it's still insufficiently obvious why. Let's add a note.

Resolves rust-lang#51603.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment