Skip to content

Conversation

PramodBisht
Copy link
Contributor

@PramodBisht PramodBisht commented Aug 14, 2018

Fixed #51602
r? @estebank

here I have addressed the case where in was not expected right after if block. Speaking of type ascription I am not sure if this the best approach which I have implemented. Plus I think one more test case can be added to test type-ascription case, though I don't have any at this point of time. I will ping you again if all existing testcases pass.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2018
@estebank
Copy link
Contributor

LGTM. I'll await for the ping.

let mut do_not_suggest_help = false;
if self.token.is_keyword(keywords::In) || self.token == token::Colon {
do_not_suggest_help = true;
}
let mut e = self.span_fatal(sp, &format!("expected `{{`, found `{}`", tok));
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're doing this, could you add this here?

e.span_label(sp, "expected `{`");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@estebank sure!

@PramodBisht
Copy link
Contributor Author

@estebank all test cases passed.

@PramodBisht PramodBisht changed the title [WIP] Addressed #51602 Addressed #51602 Aug 15, 2018
@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 15, 2018

📌 Commit b70be5b has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 16, 2018
Addressed rust-lang#51602

Fixed rust-lang#51602
r? @estebank

here I have addressed the case where `in` was not expected right after `if` block. Speaking of `type ascription` I am not sure if this the best approach which I have implemented. Plus I think one more test case can be added to test `type-ascription` case, though I don't have any at this point of time. I will ping you again if all existing testcases pass.
bors added a commit that referenced this pull request Aug 16, 2018
Rollup of 10 pull requests

Successful merges:

 - #52946 (Documented impl From on line 367 of libserialize/json.rs)
 - #53234 (Remove Travis shutdown debug scripts, and remove CI-specific DNS settings)
 - #53313 (Two small improvements)
 - #53360 (Addressed #51602)
 - #53364 (Warn if the user tries to use GATs)
 - #53373 (Tweak unclosed delimiter parser error)
 - #53377 (std: Use target_pointer_width for BACKTRACE_ELF_SIZE)
 - #53395 (Use #[non_exhaustive] on internal enums)
 - #53399 (Tidy: ignore non-Markdown files when linting for the Unstable Book)
 - #53412 (syntax_ext: remove leftover span_err_if_not_stage0 macro.)
@bors bors merged commit b70be5b into rust-lang:master Aug 16, 2018
@PramodBisht PramodBisht deleted the issue/51602 branch August 17, 2018 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants