Rollup merge of #75044 - GuillaumeGomez:cleanup-e0744, r=pickfire

Clean up E0744 explanation

r? @Dylan-DPC
This commit is contained in:
Yuki Okushi 2020-08-03 01:05:25 +09:00 committed by GitHub
commit d4cc6d8394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,6 @@
Control-flow expressions are not allowed inside a const context.
A control-flow expression was used inside a const context.
At the moment, `if` and `match`, as well as the looping constructs `for`,
`while`, and `loop`, are forbidden inside a `const`, `static`, or `const fn`.
Erroneous code example:
```compile_fail,E0744
const _: i32 = {
@ -13,6 +12,9 @@ const _: i32 = {
};
```
At the moment, `if` and `match`, as well as the looping constructs `for`,
`while`, and `loop`, are forbidden inside a `const`, `static`, or `const fn`.
This will be allowed at some point in the future, but the implementation is not
yet complete. See the tracking issue for [conditionals] or [loops] in a const
context for the current status.