Skip to content

Commit 093e45d

Browse files
Clean up E0744 explanation
1 parent 3a92b99 commit 093e45d

File tree

1 file changed

+5
-3
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+5
-3
lines changed

src/librustc_error_codes/error_codes/E0744.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
Control-flow expressions are not allowed inside a const context.
1+
A control-flow expression was used inside a const context.
22

3-
At the moment, `if` and `match`, as well as the looping constructs `for`,
4-
`while`, and `loop`, are forbidden inside a `const`, `static`, or `const fn`.
3+
Erroneous code example:
54

65
```compile_fail,E0744
76
const _: i32 = {
@@ -13,6 +12,9 @@ const _: i32 = {
1312
};
1413
```
1514

15+
At the moment, `if` and `match`, as well as the looping constructs `for`,
16+
`while`, and `loop`, are forbidden inside a `const`, `static`, or `const fn`.
17+
1618
This will be allowed at some point in the future, but the implementation is not
1719
yet complete. See the tracking issue for [conditionals] or [loops] in a const
1820
context for the current status.

0 commit comments

Comments
 (0)