about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-08-02 13:26:02 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-08-02 13:26:02 +0200
commit093e45dce656780f0ba4f3c530541def23f9d332 (patch)
tree75ab95246c84916d6cce919120cc86f738814f37 /src/librustc_error_codes/error_codes
parent3a92b9987abd01c4b7e59c870e85beb9dd4d4aa2 (diff)
downloadrust-093e45dce656780f0ba4f3c530541def23f9d332.tar.gz
rust-093e45dce656780f0ba4f3c530541def23f9d332.zip
Clean up E0744 explanation
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0744.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc_error_codes/error_codes/E0744.md b/src/librustc_error_codes/error_codes/E0744.md
index 56b947a8282..14cff3613e0 100644
--- a/src/librustc_error_codes/error_codes/E0744.md
+++ b/src/librustc_error_codes/error_codes/E0744.md
@@ -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.