Skip to content

Fix macro infinite recursion test to not trigger warning about semicolon in expr #145225

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

Merged
merged 1 commit into from
Aug 11, 2025

Conversation

joshtriplett
Copy link
Member

@joshtriplett joshtriplett commented Aug 10, 2025

The test cases for #41731 are about infinite macro recursion that
incorporates print! and println!. However, they also included
trailing semicolons despite expanding to expressions; that isn't what
these particular test cases are designed to test.

Eliminate the trailing semicolons, to simplify future work on removing
this special case. Every other macro that expands to a semicolon in an
expression is a test case for that specifically.

@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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

@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 Aug 10, 2025
@rustbot

This comment was marked as outdated.

…lon in expr

The test cases for issue 41731 are about infinite macro recursion that
incorporates `print!` and `println!`. However, they also included
trailing semicolons despite expanding to expressions; that isn't what
these particular test cases are designed to test.

Eliminate the trailing semicolons, to simplify future work on removing
this special case. Every *other* macro that expands to a semicolon in an
expression is a test case for that specifically.
@joshtriplett joshtriplett force-pushed the infinite-print-no-semi branch from 770ac1d to 0885f66 Compare August 10, 2025 21:08
@lqd
Copy link
Member

lqd commented Aug 11, 2025

r? lqd @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 11, 2025

📌 Commit 0885f66 has been approved by lqd

It is now in the queue for this repository.

@rustbot rustbot assigned lqd and unassigned BoxyUwU Aug 11, 2025
@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 11, 2025
bors added a commit that referenced this pull request Aug 11, 2025
Rollup of 5 pull requests

Successful merges:

 - #135331 (Reject relaxed bounds inside associated type bounds (ATB))
 - #144156 (Check coroutine upvars in dtorck constraint)
 - #145091 (`NllRegionVariableOrigin` remove `from_forall`)
 - #145194 (Ignore coroutine witness type region args in auto trait confirmation)
 - #145225 (Fix macro infinite recursion test to not trigger warning about semicolon in expr)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3ce0ee2 into rust-lang:master Aug 11, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Aug 11, 2025
Rollup merge of #145225 - joshtriplett:infinite-print-no-semi, r=lqd

Fix macro infinite recursion test to not trigger warning about semicolon in expr

The test cases for #41731 are about infinite macro recursion that
incorporates `print!` and `println!`. However, they also included
trailing semicolons despite expanding to expressions; that isn't what
these particular test cases are designed to test.

Eliminate the trailing semicolons, to simplify future work on removing
this special case. Every *other* macro that expands to a semicolon in an
expression is a test case for that specifically.
@rustbot rustbot added this to the 1.91.0 milestone Aug 11, 2025
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.

5 participants