58 lines
1.8 KiB
Plaintext
58 lines
1.8 KiB
Plaintext
warning: denote infinite loops with `loop { ... }`
|
|
--> $DIR/issue-52443.rs:6:11
|
|
|
|
|
LL | [(); {while true {break}; 0}];
|
|
| ^^^^^^^^^^ help: use `loop`
|
|
|
|
|
= note: `#[warn(while_true)]` on by default
|
|
|
|
error[E0744]: `for` is not allowed in a `const`
|
|
--> $DIR/issue-52443.rs:9:12
|
|
|
|
|
LL | [(); { for _ in 0usize.. {}; 0}];
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/issue-52443.rs:2:10
|
|
|
|
|
LL | [(); & { loop { continue } } ];
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| expected `usize`, found reference
|
|
| help: consider removing the borrow: `{ loop { continue } }`
|
|
|
|
|
= note: expected type `usize`
|
|
found reference `&_`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/issue-52443.rs:4:17
|
|
|
|
|
LL | [(); loop { break }];
|
|
| ^^^^^
|
|
| |
|
|
| expected `usize`, found `()`
|
|
| help: give it a value of the expected type: `break 42`
|
|
|
|
error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
|
|
--> $DIR/issue-52443.rs:9:21
|
|
|
|
|
LL | [(); { for _ in 0usize.. {}; 0}];
|
|
| ^^^^^^^^
|
|
|
|
error[E0764]: mutable references are not allowed in constants
|
|
--> $DIR/issue-52443.rs:9:21
|
|
|
|
|
LL | [(); { for _ in 0usize.. {}; 0}];
|
|
| ^^^^^^^^ `&mut` is only allowed in `const fn`
|
|
|
|
error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
|
|
--> $DIR/issue-52443.rs:9:21
|
|
|
|
|
LL | [(); { for _ in 0usize.. {}; 0}];
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to 6 previous errors; 1 warning emitted
|
|
|
|
Some errors have detailed explanations: E0015, E0308, E0744, E0764.
|
|
For more information about an error, try `rustc --explain E0015`.
|