diff --git a/src/test/ui/consts/control-flow/drop-failure.stderr b/src/test/ui/consts/control-flow/drop-failure.stderr index 35ceb3b2770..3eec3a929a0 100644 --- a/src/test/ui/consts/control-flow/drop-failure.stderr +++ b/src/test/ui/consts/control-flow/drop-failure.stderr @@ -1,21 +1,27 @@ error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/drop-failure.rs:6:9 + --> $DIR/drop-failure.rs:7:9 | LL | let x = Some(Vec::new()); | ^ constants cannot evaluate destructors error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/drop-failure.rs:19:9 + --> $DIR/drop-failure.rs:20:9 | LL | let vec_tuple = (Vec::new(),); | ^^^^^^^^^ constants cannot evaluate destructors error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/drop-failure.rs:27:9 + --> $DIR/drop-failure.rs:28:9 | LL | let x: Result<_, Vec> = Ok(Vec::new()); | ^ constants cannot evaluate destructors -error: aborting due to 3 previous errors +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/drop-failure.rs:38:9 + | +LL | let mut tmp = None; + | ^^^^^^^ constants cannot evaluate destructors + +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0493`. diff --git a/src/test/ui/consts/control-flow/interior-mutability.stderr b/src/test/ui/consts/control-flow/interior-mutability.stderr index 49e8ea3ade7..4f9c7d34c35 100644 --- a/src/test/ui/consts/control-flow/interior-mutability.stderr +++ b/src/test/ui/consts/control-flow/interior-mutability.stderr @@ -1,24 +1,35 @@ error[E0716]: temporary value dropped while borrowed - --> $DIR/interior-mutability.rs:25:26 + --> $DIR/interior-mutability.rs:40:26 | LL | let x: &'static _ = &X; | ---------- ^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | let y: &'static _ = &Y; +... LL | } | - temporary value is freed at the end of this statement error[E0716]: temporary value dropped while borrowed - --> $DIR/interior-mutability.rs:26:26 + --> $DIR/interior-mutability.rs:41:26 | LL | let y: &'static _ = &Y; | ---------- ^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` +LL | let z: &'static _ = &Z; +LL | } + | - temporary value is freed at the end of this statement + +error[E0716]: temporary value dropped while borrowed + --> $DIR/interior-mutability.rs:42:26 + | +LL | let z: &'static _ = &Z; + | ---------- ^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | } | - temporary value is freed at the end of this statement -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/control-flow/loop.both.stderr b/src/test/ui/consts/control-flow/loop.both.stderr new file mode 100644 index 00000000000..71d96b216f9 --- /dev/null +++ b/src/test/ui/consts/control-flow/loop.both.stderr @@ -0,0 +1,19 @@ +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: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0744`. diff --git a/src/test/ui/consts/control-flow/loop.if_match.stderr b/src/test/ui/consts/control-flow/loop.if_match.stderr index 15b9eb02861..e01081638ec 100644 --- a/src/test/ui/consts/control-flow/loop.if_match.stderr +++ b/src/test/ui/consts/control-flow/loop.if_match.stderr @@ -1,51 +1,72 @@ -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:8:15 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:10:15 | LL | const _: () = loop {}; | ^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `static` - --> $DIR/loop.rs:10:19 +error[E0658]: `loop` is not allowed in a `static` + --> $DIR/loop.rs:12:19 | LL | static FOO: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const fn` - --> $DIR/loop.rs:13:5 +error[E0658]: `loop` is not allowed in a `const fn` + --> $DIR/loop.rs:15:5 | LL | loop {} | ^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const fn` - --> $DIR/loop.rs:26:9 +error[E0658]: `loop` is not allowed in a `const fn` + --> $DIR/loop.rs:28:9 | LL | loop {} | ^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:38:9 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:40:9 | LL | while false {} | ^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:47:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:49:5 | LL | / while x < 4 { LL | | x += 1; LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:51:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:53:5 | LL | / while x < 8 { LL | | x += 1; LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0744]: `for` is not allowed in a `const` - --> $DIR/loop.rs:61:5 + --> $DIR/loop.rs:63:5 | LL | / for i in 0..4 { LL | | x += i; @@ -53,15 +74,15 @@ LL | | } | |_____^ error[E0744]: `for` is not allowed in a `const` - --> $DIR/loop.rs:65:5 + --> $DIR/loop.rs:67:5 | LL | / for i in 0..4 { LL | | x += i; LL | | } | |_____^ -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:75:5 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:77:5 | LL | / loop { LL | | x += 1; @@ -70,9 +91,12 @@ LL | | break; LL | | } LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:82:5 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:84:5 | LL | / loop { LL | | x += 1; @@ -81,31 +105,47 @@ LL | | break; LL | | } LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:94:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:96:5 | LL | while let None = Some(x) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:95:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:97:5 | LL | while let None = Some(x) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:17:22 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:19:22 | LL | const BAR: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:21:22 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:23:22 | LL | const BAR: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable error: aborting due to 15 previous errors -For more information about this error, try `rustc --explain E0744`. +Some errors have detailed explanations: E0658, E0744. +For more information about an error, try `rustc --explain E0658`. diff --git a/src/test/ui/consts/control-flow/loop.loop_.stderr b/src/test/ui/consts/control-flow/loop.loop_.stderr new file mode 100644 index 00000000000..cf871c9a78c --- /dev/null +++ b/src/test/ui/consts/control-flow/loop.loop_.stderr @@ -0,0 +1,96 @@ +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:40:9 + | +LL | while false {} + | ^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional + +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:49:5 + | +LL | / while x < 4 { +LL | | x += 1; +LL | | } + | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional + +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:53:5 + | +LL | / while x < 8 { +LL | | x += 1; +LL | | } + | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional + +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]: `if` is not allowed in a `const` + --> $DIR/loop.rs:79:9 + | +LL | / if x == 4 { +LL | | break; +LL | | } + | |_________^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` to the crate attributes to enable + +error[E0658]: `if` is not allowed in a `const` + --> $DIR/loop.rs:86:9 + | +LL | / if x == 8 { +LL | | break; +LL | | } + | |_________^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` 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: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional + +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:97:5 + | +LL | while let None = Some(x) { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/49146 + = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional + +error: aborting due to 9 previous errors + +Some errors have detailed explanations: E0658, E0744. +For more information about an error, try `rustc --explain E0658`. diff --git a/src/test/ui/consts/control-flow/loop.rs b/src/test/ui/consts/control-flow/loop.rs index 4be341f2d38..981cd01711b 100644 --- a/src/test/ui/consts/control-flow/loop.rs +++ b/src/test/ui/consts/control-flow/loop.rs @@ -1,9 +1,11 @@ -// Ensure that all loops are forbidden in a const context, even if `#![feature(const_if_match)]` is -// enabled. +// Ensure that loops are forbidden in a const context unless `#![feature(const_loop)]` are enabled. +// `while` loops require `#![feature(const_if_match)]` to be enabled as well. -// revisions: stock if_match +// gate-test-const_loop +// revisions: stock if_match loop_ both -#![cfg_attr(if_match, feature(const_if_match))] +#![cfg_attr(any(both, if_match), feature(const_if_match))] +#![cfg_attr(any(both, loop_), feature(const_loop))] const _: () = loop {}; //[stock,if_match]~ ERROR `loop` is not allowed in a `const` @@ -36,7 +38,7 @@ const fn const_outside() { fn main() { let x = [0; { while false {} - //[stock,if_match]~^ ERROR `while` is not allowed in a `const` + //[stock,if_match,loop_]~^ ERROR `while` is not allowed in a `const` 4 }]; } @@ -44,11 +46,11 @@ fn main() { const _: i32 = { let mut x = 0; - while x < 4 { //[stock,if_match]~ ERROR `while` is not allowed in a `const` + while x < 4 { //[stock,if_match,loop_]~ ERROR `while` is not allowed in a `const` x += 1; } - while x < 8 { //[stock,if_match]~ ERROR `while` is not allowed in a `const` + while x < 8 { //[stock,if_match,loop_]~ ERROR `while` is not allowed in a `const` x += 1; } @@ -58,11 +60,11 @@ const _: i32 = { const _: i32 = { let mut x = 0; - for i in 0..4 { //[stock,if_match]~ ERROR `for` is not allowed in a `const` + for i in 0..4 { //[stock,if_match,loop_,both]~ ERROR `for` is not allowed in a `const` x += i; } - for i in 0..4 { //[stock,if_match]~ ERROR `for` is not allowed in a `const` + for i in 0..4 { //[stock,if_match,loop_,both]~ ERROR `for` is not allowed in a `const` x += i; } @@ -74,14 +76,14 @@ const _: i32 = { loop { //[stock,if_match]~ ERROR `loop` is not allowed in a `const` x += 1; - if x == 4 { //[stock]~ ERROR `if` is not allowed in a `const` + if x == 4 { //[stock,loop_]~ ERROR `if` is not allowed in a `const` break; } } loop { //[stock,if_match]~ ERROR `loop` is not allowed in a `const` x += 1; - if x == 8 { //[stock]~ ERROR `if` is not allowed in a `const` + if x == 8 { //[stock,loop_]~ ERROR `if` is not allowed in a `const` break; } } @@ -91,7 +93,7 @@ const _: i32 = { const _: i32 = { let mut x = 0; - while let None = Some(x) { } //[stock,if_match]~ ERROR `while` is not allowed in a `const` - while let None = Some(x) { } //[stock,if_match]~ ERROR `while` is not allowed in a `const` + while let None = Some(x) { } //[stock,if_match,loop_]~ ERROR `while` is not allowed in a `const` + while let None = Some(x) { } //[stock,if_match,loop_]~ ERROR `while` is not allowed in a `const` x }; diff --git a/src/test/ui/consts/control-flow/loop.stock.stderr b/src/test/ui/consts/control-flow/loop.stock.stderr index bb651d23179..e3687cf12ac 100644 --- a/src/test/ui/consts/control-flow/loop.stock.stderr +++ b/src/test/ui/consts/control-flow/loop.stock.stderr @@ -1,51 +1,75 @@ -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:8:15 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:10:15 | LL | const _: () = loop {}; | ^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `static` - --> $DIR/loop.rs:10:19 +error[E0658]: `loop` is not allowed in a `static` + --> $DIR/loop.rs:12:19 | LL | static FOO: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const fn` - --> $DIR/loop.rs:13:5 +error[E0658]: `loop` is not allowed in a `const fn` + --> $DIR/loop.rs:15:5 | LL | loop {} | ^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const fn` - --> $DIR/loop.rs:26:9 +error[E0658]: `loop` is not allowed in a `const fn` + --> $DIR/loop.rs:28:9 | LL | loop {} | ^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:38:9 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:40:9 | LL | while false {} | ^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable + = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:47:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:49:5 | LL | / while x < 4 { LL | | x += 1; LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable + = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:51:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:53:5 | LL | / while x < 8 { LL | | x += 1; LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable + = help: add `#![feature(const_if_match)]` to the crate attributes to enable error[E0744]: `for` is not allowed in a `const` - --> $DIR/loop.rs:61:5 + --> $DIR/loop.rs:63:5 | LL | / for i in 0..4 { LL | | x += i; @@ -53,15 +77,15 @@ LL | | } | |_____^ error[E0744]: `for` is not allowed in a `const` - --> $DIR/loop.rs:65:5 + --> $DIR/loop.rs:67:5 | LL | / for i in 0..4 { LL | | x += i; LL | | } | |_____^ -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:75:5 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:77:5 | LL | / loop { LL | | x += 1; @@ -70,9 +94,12 @@ LL | | break; LL | | } LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `if` is not allowed in a `const` - --> $DIR/loop.rs:77:9 + --> $DIR/loop.rs:79:9 | LL | / if x == 4 { LL | | break; @@ -82,8 +109,8 @@ LL | | } = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:82:5 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:84:5 | LL | / loop { LL | | x += 1; @@ -92,9 +119,12 @@ LL | | break; LL | | } LL | | } | |_____^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0658]: `if` is not allowed in a `const` - --> $DIR/loop.rs:84:9 + --> $DIR/loop.rs:86:9 | LL | / if x == 8 { LL | | break; @@ -104,29 +134,43 @@ LL | | } = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:94:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:96:5 | LL | while let None = Some(x) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable + = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0744]: `while` is not allowed in a `const` - --> $DIR/loop.rs:95:5 +error[E0658]: `while` is not allowed in a `const` + --> $DIR/loop.rs:97:5 | LL | while let None = Some(x) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable + = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:17:22 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:19:22 | LL | const BAR: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable -error[E0744]: `loop` is not allowed in a `const` - --> $DIR/loop.rs:21:22 +error[E0658]: `loop` is not allowed in a `const` + --> $DIR/loop.rs:23:22 | LL | const BAR: i32 = loop { break 4; }; | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/52000 + = help: add `#![feature(const_loop)]` to the crate attributes to enable error: aborting due to 17 previous errors