You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> [^out-of-range]: A value ≥ 2<sup>128</sup> is not allowed.
16
16
17
17
A _literal expression_ is an expression consisting of a single token, rather than a sequence of tokens, that immediately and directly denotes the value it evaluates to, rather than referring to it by name or some other evaluation rule.
18
18
19
19
A literal is a form of [constant expression], so is evaluated (primarily) at compile time.
20
20
21
-
Each of the lexical [literal][literal tokens] forms described earlier can make up a literal expression.
21
+
Each of the lexical [literal][literal tokens] forms described earlier can make up a literal expression, as can the keywords `true` and `false`.
22
22
23
23
```rust
24
24
"hello"; // string type
@@ -148,10 +148,14 @@ The value of the expression is determined from the string representation of the
148
148
149
149
## Boolean literal expressions
150
150
151
-
A boolean literal expression consists of a single [BOOLEAN_LITERAL] token.
151
+
A boolean literal expression consists of one of the keywords `true` or `false`.
152
+
153
+
The expression's type is the primitive [boolean type], and its value is:
0 commit comments