1 warning: denote infinite loops with `loop { ... }`
2 --> $DIR/issue-52443.rs:6:11
4 LL | [(); {while true {break}; 0}];
5 | ^^^^^^^^^^ help: use `loop`
7 = note: `#[warn(while_true)]` on by default
9 error[E0658]: `for` is not allowed in a `const`
10 --> $DIR/issue-52443.rs:9:12
12 LL | [(); { for _ in 0usize.. {}; 0}];
13 | ^^^^^^^^^^^^^^^^^^^^
15 = note: see issue #87575 <https://github.com/rust-lang/rust/issues/87575> for more information
16 = help: add `#![feature(const_for)]` to the crate attributes to enable
18 error[E0308]: mismatched types
19 --> $DIR/issue-52443.rs:2:10
21 LL | [(); & { loop { continue } } ];
22 | ^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
24 = note: expected type `usize`
26 help: consider removing the borrow
28 LL - [(); & { loop { continue } } ];
29 LL + [(); { loop { continue } } ];
32 error[E0308]: mismatched types
33 --> $DIR/issue-52443.rs:4:17
35 LL | [(); loop { break }];
38 | expected `usize`, found `()`
39 | help: give it a value of the expected type: `break 42`
41 error[E0277]: the trait bound `RangeFrom<usize>: Iterator` is not satisfied
42 --> $DIR/issue-52443.rs:9:21
44 LL | [(); { for _ in 0usize.. {}; 0}];
45 | ^^^^^^^^ `RangeFrom<usize>` is not an iterator
47 = help: the trait `~const Iterator` is not implemented for `RangeFrom<usize>`
48 note: the trait `Iterator` is implemented for `RangeFrom<usize>`, but that implementation is not `const`
49 --> $DIR/issue-52443.rs:9:21
51 LL | [(); { for _ in 0usize.. {}; 0}];
53 = note: required for `RangeFrom<usize>` to implement `~const IntoIterator`
54 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
56 LL | fn main() where RangeFrom<usize>: ~const Iterator {
57 | +++++++++++++++++++++++++++++++++++++++
59 error: aborting due to 4 previous errors; 1 warning emitted
61 Some errors have detailed explanations: E0277, E0308, E0658.
62 For more information about an error, try `rustc --explain E0277`.