1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-05 16:10:31 +02:00

Simplify wording of constexpr/const relation

Co-authored-by: Martin Geisler <mgeisler@google.com>
This commit is contained in:
Brandon Pollack 2023-01-10 05:05:26 -08:00 committed by GitHub
parent 89ddb2c197
commit a532c23c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ Sometimes you want a global constant that isn't constructable at compile time, s
<details>
* If the target audience is well versed in C++, it might be helpful to mention that `const` behaves semantically similar to C++'s `constexpr`
* Mention that `const` behaves semantically similar to C++'s `constexpr`.
* `static`, on the other hand, is much more similar to a `const` or mutable global variable.
* It isn't super common that one would need a runtime evaluated constant, but it is helpful and safer than using a static.