rust/src/librustc_feature
bors fc6b5d6efe Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obk
Enable `loop` and `while` in constants behind a feature flag

This PR is an initial implementation of #52000. It adds a `const_loop` feature gate, which allows `while` and `loop` expressions through both HIR and MIR const-checkers if enabled. `for` expressions remain forbidden by the HIR const-checker, since they desugar to a call to `IntoIterator::into_iter`, which will be rejected anyways.

`while` loops also require [`#![feature(const_if_match)]`](https://github.com/rust-lang/rust/pull/66507), since they have a conditional built into them. The diagnostics from the HIR const checker will suggest this to the user.

r? @oli-obk
cc @rust-lang/wg-const-eval
2019-12-15 01:28:28 +00:00
..
accepted.rs Revert "Stabilize the never_type, written !." 2019-12-14 09:01:09 -05:00
active.rs Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obk 2019-12-15 01:28:28 +00:00
builtin_attrs.rs Require stable/unstable annotations for the constness of all stable functions with a const modifier 2019-12-13 11:27:02 +01:00
Cargo.toml builtin_attrs.rs -> rustc_feature 2019-11-30 02:34:18 +01:00
lib.rs move GateIssue to rustc_feature & simplify emit_feature_err 2019-11-30 07:40:28 +01:00
removed.rs introduce crate rustc_feature and move active, accepted, and removed to it 2019-11-30 00:25:40 +01:00