File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ feature( const_for) ]
2+ #![ feature( const_mut_refs) ]
3+
4+ const _: ( ) = {
5+ for _ in 0 ..5 { }
6+ //~^ error: calls in constants are limited to
7+ //~| error: calls in constants are limited to
8+ } ;
9+
10+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
2+ --> $DIR/const-for.rs:5:14
3+ |
4+ LL | for _ in 0..5 {}
5+ | ^^^^
6+
7+ error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
8+ --> $DIR/const-for.rs:5:14
9+ |
10+ LL | for _ in 0..5 {}
11+ | ^^^^
12+
13+ error: aborting due to 2 previous errors
14+
15+ For more information about this error, try `rustc --explain E0015`.
You can’t perform that action at this time.
0 commit comments