diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-11-15 22:55:45 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-11-21 15:23:51 -0800 |
| commit | 26d93f35f6965cec7e75099bc775e24c61ca9f7a (patch) | |
| tree | e4c98c9135c9a3bec3f869696ac6a093a5e3bd1f /src/doc | |
| parent | ccb6e9884ed869ce881248b8662291121310b67d (diff) | |
| download | rust-26d93f35f6965cec7e75099bc775e24c61ca9f7a.tar.gz rust-26d93f35f6965cec7e75099bc775e24c61ca9f7a.zip | |
Add entry for `const_if_match` in unstable book
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/unstable-book/src/language-features/const-if-match.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/const-if-match.md b/src/doc/unstable-book/src/language-features/const-if-match.md new file mode 100644 index 00000000000..ee9cfcbd9de --- /dev/null +++ b/src/doc/unstable-book/src/language-features/const-if-match.md @@ -0,0 +1,14 @@ +# `const_if_match` + +The tracking issue for this feature is: [#49146] + +[#49146]: https://github.com/rust-lang/rust/issues/49146 + +------------------------ + +Allows for the use of conditionals (`if` and `match`) in a const context. +Const contexts include `static`, `static mut`, `const`, `const fn`, const +generics, and array initializers. Enabling this feature flag will also make +`&&` and `||` function normally in a const-context by removing the hack that +replaces them with their non-short-circuiting equivalents, `&` and `|`, in a +`const` or `static`. |
