rust/src/libsyntax_pos
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
..
analyze_source_file libsyntax_pos: Unconfigure tests during normal build 2019-08-02 01:59:01 +03:00
source_map Move SourceMap to syntax_pos 2019-11-15 08:38:31 -05:00
symbol Remove gensyms 2019-10-15 21:12:05 +01:00
analyze_source_file.rs libsyntax_pos: Unconfigure tests during normal build 2019-08-02 01:59:01 +03:00
caching_source_map_view.rs Move CachingSourceMapView to libsyntax_pos. 2019-11-23 17:57:17 +01:00
Cargo.toml Move SourceMap to syntax_pos 2019-11-15 08:38:31 -05:00
edition.rs HashStable_Generic for libsyntax_pos. 2019-11-17 22:37:13 +01:00
fatal_error.rs Move FatalError to syntax_pos 2019-11-15 08:21:23 -05:00
hygiene.rs Auto merge of #66279 - cjgillot:hashstable, r=Zoxc 2019-11-25 09:28:59 +00:00
lib.rs Implement HashStable for Span in libsyntax_pos. 2019-11-23 18:09:36 +01:00
source_map.rs Retire impl_stable_hash_for_spanned. 2019-11-22 20:01:47 +01:00
span_encoding.rs Increase Span from 4 bytes to 8 bytes. 2019-04-05 12:26:09 +11:00
symbol.rs Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obk 2019-12-15 01:28:28 +00:00
tests.rs Fix the start/end byte positions in the compiler JSON output 2019-10-21 19:28:29 +03:00