Skip to content

Add test for issue #101532: dead code warnings in const _#154246

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
JumpiiX:fix-101532-dead-code-warnings
Mar 28, 2026
Merged

Add test for issue #101532: dead code warnings in const _#154246
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
JumpiiX:fix-101532-dead-code-warnings

Conversation

@JumpiiX
Copy link
Copy Markdown
Contributor

@JumpiiX JumpiiX commented Mar 23, 2026

Closes #101532

Adds a test for dead code warnings in const _.

This was already fixed, just adding coverage to avoid regressions.

@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 Mar 23, 2026
@rustbot

This comment has been minimized.

@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from ebdf48f to 0b9eac8 Compare March 23, 2026 09:48
@rust-log-analyzer

This comment has been minimized.

@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from 0b9eac8 to 6d8bcd1 Compare March 23, 2026 10:06
@rustbot

This comment has been minimized.

@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from 6d8bcd1 to 4975cd0 Compare March 23, 2026 10:32
@rust-log-analyzer

This comment has been minimized.

@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from 4975cd0 to d06b0db Compare March 23, 2026 11:11
@rust-log-analyzer

This comment has been minimized.

@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from d06b0db to cb34b4e Compare March 23, 2026 12:08
@rust-log-analyzer

This comment has been minimized.

@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from cb34b4e to 1017004 Compare March 23, 2026 12:44
@rust-log-analyzer

This comment has been minimized.

Tests that dead code warnings work correctly inside const _ blocks.
Issue was already fixed, adding regression test as requested.
@JumpiiX JumpiiX force-pushed the fix-101532-dead-code-warnings branch from 1017004 to 36c22f7 Compare March 24, 2026 12:52
@JumpiiX JumpiiX requested a review from reddevilmidzy March 25, 2026 13:55
@reddevilmidzy
Copy link
Copy Markdown
Member

It looks good to me :) However, unfortunately, I don't have roll-up permission, so you'll have to wait for the designated reviewer, fmease.

Additionally, please refrain from using LLM when writing PR descriptions.

@JumpiiX
Copy link
Copy Markdown
Contributor Author

JumpiiX commented Mar 26, 2026

Thanks for the response @reddevilmidzy , appreciate it!
We’ll wait for feedback from @fmease 👍

Copy link
Copy Markdown
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 27, 2026

📌 Commit 36c22f7 has been approved by fmease

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Mar 27, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 27, 2026
Rollup of 10 pull requests

Successful merges:

 - #154070 (Unstable book options parser)
 - #154371 (Use LocalDefId for more tcx method calls)
 - #154405 (Improve doc comment unicode guidance)
 - #154431 (Avoid ICE in explicit reference cast suggestion for unrelated leaf pr…)
 - #153528 (Fix LegacyKeyValueFormat report from docker build: mips)
 - #154246 (Add test for issue #101532: dead code warnings in const _)
 - #154421 (Rustdoc rejects html emits with json output)
 - #154428 (bootstrap: `-Zjson-target-spec` for synthetic targets)
 - #154437 (bootstrap.example.toml: Hint how to allow `build.warnings`)
 - #154454 (fix: [rustfmt] prevent panic when rewritng associated item delegations)

Failed merges:

 - #154450 (Use the normal arg-parsing machinery for `-Zassert-incr-state`)
rust-bors bot pushed a commit that referenced this pull request Mar 27, 2026
Rollup of 10 pull requests

Successful merges:

 - #154070 (Unstable book options parser)
 - #154371 (Use LocalDefId for more tcx method calls)
 - #154405 (Improve doc comment unicode guidance)
 - #154431 (Avoid ICE in explicit reference cast suggestion for unrelated leaf pr…)
 - #153528 (Fix LegacyKeyValueFormat report from docker build: mips)
 - #154246 (Add test for issue #101532: dead code warnings in const _)
 - #154421 (Rustdoc rejects html emits with json output)
 - #154428 (bootstrap: `-Zjson-target-spec` for synthetic targets)
 - #154437 (bootstrap.example.toml: Hint how to allow `build.warnings`)
 - #154454 (fix: [rustfmt] prevent panic when rewritng associated item delegations)

Failed merges:

 - #154450 (Use the normal arg-parsing machinery for `-Zassert-incr-state`)
@rust-bors rust-bors bot merged commit 84ecc09 into rust-lang:main Mar 28, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 28, 2026
rust-timer added a commit that referenced this pull request Mar 28, 2026
Rollup merge of #154246 - JumpiiX:fix-101532-dead-code-warnings, r=fmease

Add test for issue #101532: dead code warnings in const _

Closes #101532

Adds a test for dead code warnings in `const _`.

This was already fixed, just adding coverage to avoid regressions.
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.

Most dead code warnings don't work inside const _

5 participants