Skip to content

Conversation

@scottmcm
Copy link
Member

@scottmcm scottmcm commented Feb 12, 2026

r? fmease
Fixes #152501

@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. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Feb 12, 2026
@@ -0,0 +1,12 @@
//@ run-pass
Copy link
Member

Choose a reason for hiding this comment

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

wondering: does this need to run?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, probably not. You're thinking check-pass instead?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah. It should be enough, right? Since this is in the frontend, it shouldn't need codegen (which is the build-pass variety), and check should work.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, check-pass more than suffices.

Copy link
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.

Thanks! r=me with build-passcheck-pass @bors rollup

View changes since this review

@@ -0,0 +1,12 @@
//@ run-pass
Copy link
Member

Choose a reason for hiding this comment

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

Indeed, check-pass more than suffices.

Copy link
Member

@fmease fmease Feb 12, 2026

Choose a reason for hiding this comment

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

Usually I put test cases that ensure the feature gate happens before expansion in the dedicated tests/ui/feature-gates/feature-gate-$FEATURE.rs right next to the other test cases. I guess a separate test file is also fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I wasn't sure that both in the same file worked. If that's normal, then great, I'd rather not have another file.

I kept the homogeneous one in the separate file because the warning seems to only be there when the error didn't happen earlier (which is good).

@fmease fmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2026
Copy link
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
Contributor

rust-bors bot commented Feb 12, 2026

📌 Commit 6afebcc 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 12, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 13, 2026
Fix feature gating for new `try bikeshed` expressions

r? fmease
Fixes rust-lang#152501
rust-bors bot pushed a commit that referenced this pull request Feb 13, 2026
Rollup of 18 pull requests

Successful merges:

 - #150551 (Compute localized outlives constraints lazily)
 - #150752 (Update libc to v0.2.181)
 - #150988 (Improve code suggestion for incorrect macro_rules! usage)
 - #152422 (Change query proc macro to be more rust-analyzer friendly)
 - #152496 (Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto)
 - #152514 (Collect active query jobs into struct `QueryJobMap`)
 - #152520 (Don't use `DepContext` in `rustc_middle::traits::cache`)
 - #152528 (Support serializing CodegenContext)
 - #152082 (Move tests)
 - #152232 (Add must_use for FileTimes)
 - #152329 (Simplify parallel! macro)
 - #152444 (`-Znext-solver` Prevent committing unfulfilled unsized coercion)
 - #152486 (remove redundant backchain attribute in codegen)
 - #152519 (Fix feature gating for new `try bikeshed` expressions)
 - #152529 (sparc64: enable abi compatibility test)
 - #152548 (reject inline const patterns pre-expansion)
 - #152550 (Port #[prelude_import] to the attribute parser)
 - #152552 (Add 2048-bit HvxVectorPair support to Hexagon SIMD ABI checks)
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 13, 2026
Fix feature gating for new `try bikeshed` expressions

r? fmease
Fixes rust-lang#152501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-nominated Nominated for backporting to the compiler in the beta channel. 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.

try bikeshed $ty { … } is not pre-expansion gated (affects beta+nightly)

4 participants