-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Closed
Copy link
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Description
The following code compiles even though it shouldn't:
fn main() {
#[cfg(false)]
try bikeshed () {}
} Contrary to try { … } it does not even issue a pre-expansion gate warning. For context, try blocks and some other ancient features are notoriously post-expansion gated which we can't change without breaking a large amount of crates in the ecosystem (which use the #[cfg(feature = "nightly")] pattern). For new syntactic forms however we require a pre-expansion feature gate nowadays for forward compatibility reasons. try bikeshed $ty { … } is a new syntactic form and thus should be pre-expansion gated by try_blockstry_block_heterogeneous.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.