-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Addressed #51602 #53360
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
Addressed #51602 #53360
Conversation
LGTM. I'll await for the ping. |
src/libsyntax/parse/parser.rs
Outdated
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)); |
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.
While you're doing this, could you add this here?
e.span_label(sp, "expected `{`");
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.
@estebank sure!
f93a7e4
to
b70be5b
Compare
@estebank all test cases passed. |
@bors r+ rollup |
📌 Commit b70be5b has been approved by |
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.
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.)
Fixed #51602
r? @estebank
here I have addressed the case where
in
was not expected right afterif
block. Speaking oftype 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 testtype-ascription
case, though I don't have any at this point of time. I will ping you again if all existing testcases pass.