Skip to content

Commit b5aeaa2

Browse files
authored
Merge pull request #124 from brauliobz/unit_is_not_literal
The unit value is not a literal, it is a tuple expression
2 parents d512441 + f58d003 commit b5aeaa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expressions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,9 @@ exist in `core::ops` and `core::cmp` with the same names.
232232

233233
A _literal expression_ consists of one of the [literal](tokens.html#literals)
234234
forms described earlier. It directly describes a number, character, string,
235-
boolean value, or the unit value.
235+
or boolean value.
236236

237237
```rust
238-
(); // unit type
239238
"hello"; // string type
240239
'5'; // character type
241240
5; // integer type
@@ -272,6 +271,7 @@ values.
272271
```rust
273272
(0.0, 4.5);
274273
("a", 4usize, true);
274+
();
275275
```
276276

277277
You can disambiguate a single-element tuple from a value in parentheses with a

0 commit comments

Comments
 (0)