-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for migrating all remaining post-expansion feature gates to pre-expansion ones #154045
Copy link
Copy link
Open
Labels
A-grammarArea: The grammar of RustArea: The grammar of RustA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCL-unstable_syntax_pre_expansionLint: unstable-syntax-pre-expansionLint: unstable-syntax-pre-expansionT-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.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-grammarArea: The grammar of RustArea: The grammar of RustA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCL-unstable_syntax_pre_expansionLint: unstable-syntax-pre-expansionLint: unstable-syntax-pre-expansionT-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.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Tip
If you've arrived here because you encountered a feature gate warning for unstable syntax behind
#[cfg(…)], here's how to you can transform your code while keeping the unstable syntaxcfg-conditional:Before (triggers a feature gate warning):
After (first approach) (idiomatic, doesn't trigger a warning):
After (second approach) (idiomatic, doesn't trigger a warning):
If you'd like to see a more realistic example, head on over to https://github.com/arcnmx/packed-rs/pull/1/changes.
Steps
For all the other ones that also don't emit a pre-expansion warning yet, add warnings immediately(done)no further input from T-compiler/T-lang should be needed since it's already legitimized by MCP 535.Affected Syntactic Constructs
default(featurespecializationormin_specializationfor fns only)!(featurenegative_impls)try { … }(featuretry_blocks)box $pat(featurebox_patterns)$patpath { box $ident }, pseudo binding mode (featurebox_patterns)trait $ident $genericparams = $bounds;(featuretrait_alias)auto(featureauto_traits)impl $traitref for .. {}(early version of a now removed predecessor of featureauto_traits)macro $ident$macroparams { $ttstar }(featuredecl_macro)$ty = $tyand$ty == $ty(no corresp. feature was ever added (cc RUST-22074, RUST-87471))Pre-History (Incomplete)
autotraits pre-expansion #116393impl Trait for ..syntax #121072Implementation History
box'ed struct field patterns #154475Downstream Patches