summary refs log tree commit diff
path: root/compiler/rustc_error_codes
diff options
context:
space:
mode:
authorJames <tpzker@thepuzzlemaker.info>2020-11-15 20:34:16 -0600
committerThePuzzlemaker <tpzker@thepuzzlemaker.info>2020-11-16 09:30:29 -0600
commit0bc04e327c54db788b0a7093879e3c4e51301356 (patch)
tree52552d865f0383cb964c207effd0ac1aefb81efc /compiler/rustc_error_codes
parentf5230fbf76bafd86ee4376a0e26e551df8d17fec (diff)
downloadrust-0bc04e327c54db788b0a7093879e3c4e51301356.tar.gz
rust-0bc04e327c54db788b0a7093879e3c4e51301356.zip
Update E0744 about control flow in `const` contexts to reflect the current status of `const fn`.
This is a squash of these commits:
- Update E0744 about control flow in `const` contexts to reflect current status of `const fn`.
- E0744 isn't just about `for` loops or control flow
- Fix formatting on E0744 cause my editor decided to not copy it well
- Improve wording
- Fix a markdown formatting error
- Fix E0744's description as I interpreted some code wrong
- Fix a minor wording issue again
- Add a few more links to blocking issues
- Improve links to tracking issues
Diffstat (limited to 'compiler/rustc_error_codes')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0744.md19
1 files changed, 11 insertions, 8 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0744.md b/compiler/rustc_error_codes/src/error_codes/E0744.md
index 14cff3613e0..45804ab266e 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0744.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0744.md
@@ -1,4 +1,4 @@
-A control-flow expression was used inside a const context.
+An unsupported expression was used inside a const context.
 
 Erroneous code example:
 
@@ -12,12 +12,15 @@ 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`.
+At the moment, `for` loops, `.await`, and the `Try` operator (`?`) 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.
+This may be allowed at some point in the future, but the implementation is not
+yet complete. See the tracking issues for [`async`] and [`?`] in `const fn`, and
+(to support `for` loops in `const fn`) the tracking issues for [`impl const
+Trait for Ty`] and [`&mut T`] in `const fn`.
 
-[conditionals]: https://github.com/rust-lang/rust/issues/49146
-[loops]: https://github.com/rust-lang/rust/issues/52000
+[`async`]: https://github.com/rust-lang/rust/issues/69431
+[`?`]: https://github.com/rust-lang/rust/issues/74935
+[`impl const Trait for Ty`]: https://github.com/rust-lang/rust/issues/67792
+[`&mut T`]: https://github.com/rust-lang/rust/issues/57349