]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0744 explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 2 Aug 2020 11:26:02 +0000 (13:26 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 2 Aug 2020 11:26:02 +0000 (13:26 +0200)
src/librustc_error_codes/error_codes/E0744.md

index 56b947a8282edb585ee2416f4e96426e5478d7af..14cff3613e02394acfe42a93b269013e6cf82f4b 100644 (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.