error[E0658]: `loop` is not allowed in a `const` --> $DIR/loop.rs:10:15 | LL | const _: () = loop {}; | ^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `loop` is not allowed in a `static` --> $DIR/loop.rs:12:19 | LL | static FOO: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `loop` is not allowed in a `const fn` --> $DIR/loop.rs:15:5 | LL | loop {} | ^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `loop` is not allowed in a `const fn` --> $DIR/loop.rs:28:9 | LL | loop {} | ^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `while` is not allowed in a `const` --> $DIR/loop.rs:40:9 | LL | while false {} | ^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `while` is not allowed in a `const` --> $DIR/loop.rs:49:5 | LL | / while x < 4 { LL | | x += 1; LL | | } | |_____^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `while` is not allowed in a `const` --> $DIR/loop.rs:53:5 | LL | / while x < 8 { LL | | x += 1; LL | | } | |_____^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0744]: `for` is not allowed in a `const` --> $DIR/loop.rs:63:5 | LL | / for i in 0..4 { LL | | x += i; LL | | } | |_____^ error[E0744]: `for` is not allowed in a `const` --> $DIR/loop.rs:67:5 | LL | / for i in 0..4 { LL | | x += i; LL | | } | |_____^ error[E0658]: `loop` is not allowed in a `const` --> $DIR/loop.rs:77:5 | LL | / loop { LL | | x += 1; LL | | if x == 4 { LL | | break; LL | | } LL | | } | |_____^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `loop` is not allowed in a `const` --> $DIR/loop.rs:84:5 | LL | / loop { LL | | x += 1; LL | | if x == 8 { LL | | break; LL | | } LL | | } | |_____^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `while` is not allowed in a `const` --> $DIR/loop.rs:96:5 | LL | while let None = Some(x) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `while` is not allowed in a `const` --> $DIR/loop.rs:97:5 | LL | while let None = Some(x) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `loop` is not allowed in a `const` --> $DIR/loop.rs:19:22 | LL | const BAR: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `loop` is not allowed in a `const` --> $DIR/loop.rs:23:22 | LL | const BAR: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error: aborting due to 15 previous errors Some errors have detailed explanations: E0658, E0744. For more information about an error, try `rustc --explain E0658`.