Skip to content

Split non-local semicolon_in_expressions_from_macros into a separate lint#159700

Open
joshtriplett wants to merge 2 commits into
rust-lang:mainfrom
joshtriplett:semicolon-in-expressions-from-non-local-macros
Open

Split non-local semicolon_in_expressions_from_macros into a separate lint#159700
joshtriplett wants to merge 2 commits into
rust-lang:mainfrom
joshtriplett:semicolon-in-expressions-from-non-local-macros

Conversation

@joshtriplett

Copy link
Copy Markdown
Member

The new handling for non-local macros in
semicolon_in_expressions_from_macros produces new deny-by-default
lints on various existing crates, which have not previously received
warnings because prior Rust versions suppressed them. Split those out
into a new semicolon_in_expressions_from_non_local_macros lint, and
make that one warn-by-default (and FCW warn-in-deps), rather than
deny-by-default, to give the ecosystem time to adapt.

This reintroduces the is_local tracking from commit
9192337.

@joshtriplett joshtriplett added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-lang Relevant to the language team F-decl_macro `#![feature(decl_macro)]` I-lang-nominated Nominated for discussion during a lang team meeting. L-semicolon_in_expressions_from_macros Lint: semicolon_in_expressions_from_macros I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Jul 22, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 22, 2026
@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 74 candidates
  • Random selection from 17 candidates

@joshtriplett

Copy link
Copy Markdown
Member Author

Needs lang approval for the new lint. Hoping to get that approval in tomorrow's (2026-07-22) lang meeting.

This is needed due to many new errors in the ecosystem; we need to give people time to fix those, and not (effectively) go directly from not emitting a lint at all to emitting a deny-by-default lint.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

…e lint

The new handling for non-local macros in
`semicolon_in_expressions_from_macros` produces new deny-by-default
lints on various existing crates, which have not previously received
warnings because prior Rust versions suppressed them. Split those out
into a new `semicolon_in_expressions_from_non_local_macros` lint, and
make that one warn-by-default (and FCW warn-in-deps), rather than
deny-by-default, to give the ecosystem time to adapt.

This reintroduces the `is_local` tracking from commit
9192337.
…ros`

The automatic mechanism to produce lint examples won't work, since this
lint needs a separate crate, so add a `rust,ignore` example and manually
provide the compiler output.
@joshtriplett
joshtriplett force-pushed the semicolon-in-expressions-from-non-local-macros branch from d35b967 to c1a4b72 Compare July 22, 2026 06:37
@traviscross traviscross added the P-lang-drag-0 Lang team prioritization drag level 0.https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang. label Jul 22, 2026
@petrochenkov petrochenkov added S-waiting-on-t-lang Status: Awaiting decision from T-lang and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2026
@traviscross

Copy link
Copy Markdown
Contributor

Proposed to accept this and waive any part of our 10-day FCP period necessary to get this into the next release.

@rfcbot fcp merge lang

@rust-rfcbot

rust-rfcbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

@traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jul 22, 2026
@tmandry

tmandry commented Jul 22, 2026

Copy link
Copy Markdown
Member

@rfcbot reviewed

1 similar comment
@nikomatsakis

Copy link
Copy Markdown
Contributor

@rfcbot reviewed

@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jul 22, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@joshtriplett joshtriplett added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-t-lang Status: Awaiting decision from T-lang I-lang-nominated Nominated for discussion during a lang team meeting. labels Jul 22, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📋 This PR cannot be approved because it currently has the following label: final-comment-period.

@petrochenkov

Copy link
Copy Markdown
Contributor

Ah, wrong label, still waiting on lang fcp.

@petrochenkov petrochenkov added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2026
@joshtriplett

Copy link
Copy Markdown
Member Author

@petrochenkov We have five out of five checkboxes, and an explicitly waived 10-day period. Let's go ahead and merge this; it's easy enough to revert if the situation changes.

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

Labels

A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. F-decl_macro `#![feature(decl_macro)]` final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination L-semicolon_in_expressions_from_macros Lint: semicolon_in_expressions_from_macros P-lang-drag-0 Lang team prioritization drag level 0.https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants