diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-23 19:28:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-23 19:28:10 +0100 |
| commit | a26c2c7495b6a6d4df49d6dabe3453057804e98e (patch) | |
| tree | 69b568250bf8a7df78247950b7a99483c3044a31 /compiler/rustc_feature/src | |
| parent | 448422471020d80a2fe6f9732d16ca19c93a12c4 (diff) | |
| parent | 6f38568decbab94e06e1df740b8b7a140be88e54 (diff) | |
| download | rust-a26c2c7495b6a6d4df49d6dabe3453057804e98e.tar.gz rust-a26c2c7495b6a6d4df49d6dabe3453057804e98e.zip | |
Rollup merge of #91140 - nbdd0121:const_typeck, r=oli-obk
Split inline const to two feature gates and mark expression position inline const complete This PR splits inline const in pattern position into its own `#![feature(inline_const_pat)]` feature gate, and make the usage in expression position complete. I think I have resolved most outstanding issues related to `inline_const` with #89561 and other PRs. The only thing left that I am aware of is #90150 and the lack of lifetime checks when inline const is used in pattern position (FIXME in #89561). Implementation-wise when used in pattern position it has to be lowered during MIR building while in expression position it's evaluated only when monomorphizing (just like normal consts), so it makes some sense to separate it into two feature gates so one can progress without being blocked by another. ``@rustbot`` label: T-compiler F-inline_const
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 608581306be..c34ecc966d0 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -409,7 +409,9 @@ declare_features! ( /// Allows associated types in inherent impls. (incomplete, inherent_associated_types, "1.52.0", Some(8995), None), /// Allow anonymous constants from an inline `const` block - (incomplete, inline_const, "1.49.0", Some(76001), None), + (active, inline_const, "1.49.0", Some(76001), None), + /// Allow anonymous constants from an inline `const` block in pattern position + (incomplete, inline_const_pat, "1.58.0", Some(76001), None), /// Allows using `pointer` and `reference` in intra-doc links (active, intra_doc_pointers, "1.51.0", Some(80896), None), /// Allows `#[instruction_set(_)]` attribute |
