diff options
Diffstat (limited to 'tests/ui/consts/const-for-feature-gate.rs')
-rw-r--r-- | tests/ui/consts/const-for-feature-gate.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/consts/const-for-feature-gate.rs b/tests/ui/consts/const-for-feature-gate.rs new file mode 100644 index 000000000..bec7b8089 --- /dev/null +++ b/tests/ui/consts/const-for-feature-gate.rs @@ -0,0 +1,8 @@ +// gate-test-const_for + +const _: () = { + for _ in 0..5 {} + //~^ error: `for` is not allowed in a `const` +}; + +fn main() {} |