mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-03 01:56:12 +02:00
clarify static details
Co-authored-by: Martin Geisler <mgeisler@google.com>
This commit is contained in:
parent
a532c23c60
commit
b5a7c9cdcc
@ -54,7 +54,7 @@ Sometimes you want a global constant that isn't constructable at compile time, s
|
||||
<details>
|
||||
|
||||
* 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.
|
||||
* `static`, on the other hand, is much more similar to a `const` or mutable global variable in C++.
|
||||
* It isn't super common that one would need a runtime evaluated constant, but it is helpful and safer than using a static.
|
||||
|
||||
</details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user