Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 1 | error[E0658]: `while` is not allowed in a `const` |
| 2 | --> $DIR/loop.rs:40:9 |
| 3 | | |
| 4 | LL | while false {} |
| 5 | | ^^^^^^^^^^^^^^ |
| 6 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 7 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 8 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 9 | = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional |
| 10 | |
| 11 | error[E0658]: `while` is not allowed in a `const` |
| 12 | --> $DIR/loop.rs:49:5 |
| 13 | | |
| 14 | LL | / while x < 4 { |
| 15 | LL | | x += 1; |
| 16 | LL | | } |
| 17 | | |_____^ |
| 18 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 19 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 20 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 21 | = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional |
| 22 | |
| 23 | error[E0658]: `while` is not allowed in a `const` |
| 24 | --> $DIR/loop.rs:53:5 |
| 25 | | |
| 26 | LL | / while x < 8 { |
| 27 | LL | | x += 1; |
| 28 | LL | | } |
| 29 | | |_____^ |
| 30 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 31 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 32 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 33 | = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional |
| 34 | |
| 35 | error[E0744]: `for` is not allowed in a `const` |
| 36 | --> $DIR/loop.rs:63:5 |
| 37 | | |
| 38 | LL | / for i in 0..4 { |
| 39 | LL | | x += i; |
| 40 | LL | | } |
| 41 | | |_____^ |
| 42 | |
| 43 | error[E0744]: `for` is not allowed in a `const` |
| 44 | --> $DIR/loop.rs:67:5 |
| 45 | | |
| 46 | LL | / for i in 0..4 { |
| 47 | LL | | x += i; |
| 48 | LL | | } |
| 49 | | |_____^ |
| 50 | |
| 51 | error[E0658]: `if` is not allowed in a `const` |
| 52 | --> $DIR/loop.rs:79:9 |
| 53 | | |
| 54 | LL | / if x == 4 { |
| 55 | LL | | break; |
| 56 | LL | | } |
| 57 | | |_________^ |
| 58 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 59 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 60 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 61 | |
| 62 | error[E0658]: `if` is not allowed in a `const` |
| 63 | --> $DIR/loop.rs:86:9 |
| 64 | | |
| 65 | LL | / if x == 8 { |
| 66 | LL | | break; |
| 67 | LL | | } |
| 68 | | |_________^ |
| 69 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 70 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 71 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 72 | |
| 73 | error[E0658]: `while` is not allowed in a `const` |
| 74 | --> $DIR/loop.rs:96:5 |
| 75 | | |
| 76 | LL | while let None = Some(x) { } |
| 77 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 78 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 79 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 80 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 81 | = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional |
| 82 | |
| 83 | error[E0658]: `while` is not allowed in a `const` |
| 84 | --> $DIR/loop.rs:97:5 |
| 85 | | |
| 86 | LL | while let None = Some(x) { } |
| 87 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 88 | | |
Matthew Maurer | 15a6560 | 2020-04-24 14:05:21 -0700 | [diff] [blame^] | 89 | = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information |
Matthew Maurer | f4d8f81 | 2020-03-27 13:14:30 -0700 | [diff] [blame] | 90 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable |
| 91 | = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional |
| 92 | |
| 93 | error: aborting due to 9 previous errors |
| 94 | |
| 95 | Some errors have detailed explanations: E0658, E0744. |
| 96 | For more information about an error, try `rustc --explain E0658`. |