Skip to content

Do not suggest a semicolon for a macro without ! - #101502

Merged
bors merged 1 commit into
rust-lang:masterfrom
TaKO8Ki:do-not-suggest-semicolon-for-macro-without-exclamation-mark
Sep 7, 2022
Merged

bors merged 1 commit into
rust-lang:masterfrom
TaKO8Ki:do-not-suggest-semicolon-for-macro-without-exclamation-mark

Conversation

@TaKO8Ki

@TaKO8Ki TaKO8Ki commented Sep 6, 2022 •

Copy link
Copy Markdown
Member

Fixes a regression in #101490

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 6, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 6, 2022
open_delim_span: Span,
) -> PResult<'a, ()> {
if self.token.kind == token::Comma {
if !self.sess.source_map().is_multiline(prev_span.until(self.token.span)) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This refers to Parser::expected_one_of_not_found.

} else if !sm.is_multiline(self.prev_token.span.until(self.token.span)) {
// The current token is in the same line as the prior token, not recoverable.

@Rageking8

Rageking8 commented Sep 6, 2022 •

Copy link
Copy Markdown
Contributor

Sorry just to check if this PR is going to be used to implement the second part of the issue (i.e. suggest adding the ! when invoking the vec macro incorrectly as with other macros). Since this PR seems to be used solely for resolving the regression. Thanks.

Edit: resolved

@wesleywiser

Copy link
Copy Markdown
Member

Thanks @TaKO8Ki!

@bors r+ rollup

@bors

bors commented Sep 7, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 7ac1248 has been approved by wesleywiser

It is now in the queue for this repository.

@bors

bors commented Sep 7, 2022

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 Sep 7, 2022
@Rageking8

Rageking8 commented Sep 7, 2022 •

Copy link
Copy Markdown
Contributor

@wesleywiser AFAIK this PR is not supposed to close the referenced issue as the second part is not done. However if wanted I can edit the reference issue to match this PR and make the second part into its own issue. (Note: see my above comment for more context). Thanks.

Edit: resolved

@wesleywiser

Copy link
Copy Markdown
Member

@Rageking8 got it, thanks for the correction!

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 7, 2022
…iaskrgr

Rollup of 14 pull requests

Successful merges:

 - rust-lang#101343 (Add -api-level to pm command)
 - rust-lang#101416 (stdio: Document no support for writing to non-blocking stdio/stderr)
 - rust-lang#101435 (Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH`)
 - rust-lang#101493 (Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow)
 - rust-lang#101502 (Do not suggest a semicolon for a macro without `!`)
 - rust-lang#101503 (Add debug calls)
 - rust-lang#101506 (rustdoc: remove unused CSS `#main-content > .since`)
 - rust-lang#101507 (rustdoc: remove unused CSS `#main-content > table td`)
 - rust-lang#101521 (Rustdoc-Json: More accurate struct type.)
 - rust-lang#101525 (Fix typo in pass_manager.rs)
 - rust-lang#101534 (rustdoc: remove unused mobile CSS `.rustdoc { flex-direction }`)
 - rust-lang#101535 (Fix error printing mistake in tidy)
 - rust-lang#101536 (Add documentation for Attr::is_doc_comment)
 - rust-lang#101538 (rustdoc: remove unused CSS `.content .methods > div`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit c365ce3 into rust-lang:master Sep 7, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 7, 2022
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants