Skip to content

Commit 4471b0e

Browse files
committed
Address review comments w.r.t. remove enum variant expr
1 parent d8cbe4e commit 4471b0e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

book.toml

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ author = "The Rust Project Developers"
66
[output.html]
77
additional-css = ["theme/reference.css"]
88
git-repository-url = "https://github.com/rust-lang/reference/"
9+
10+
[output.html.redirect]
11+
"/expressions/enum-variant-expr.html" = "struct-expr.html"

src/expressions/struct-expr.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
> _StructExprUnit_ : [_PathInExpression_]
2929
3030
A *struct expression* creates a struct, enum, or union value.
31-
It consists of a path to a [struct], [enum], or [union] item followed by the values for the fields of the item.
31+
It consists of a path to a [struct], [enum variant], or [union] item followed by the values for the fields of the item.
3232
There are three forms of struct expressions: struct, tuple, and unit.
3333

3434
The following are examples of struct expressions:
@@ -101,8 +101,7 @@ Point3d { x, y: y_value, z };
101101
## Tuple struct expression
102102

103103
A struct expression with fields enclosed in parentheses constructs a tuple struct.
104-
Though it is listed here as a specific expression for completeness, it is equivalent to a [call expression] to the tuple struct's constructor. For example: <!--
105-
This is false. Example: Position(0, ..other_position) -->
104+
Though it is listed here as a specific expression for completeness, it is equivalent to a [call expression] to the tuple struct's constructor. For example:
106105

107106
```rust
108107
struct Position(i32, i32, i32);
@@ -135,7 +134,7 @@ let b = Gamma{}; // Exact same value as `a`.
135134
[_PathInExpression_]: ../paths.md#paths-in-expressions
136135
[attributes on block expressions]: block-expr.md#attributes-on-block-expressions
137136
[call expression]: call-expr.md
138-
[enum]: ../items/enumerations.md
137+
[enum variant]: ../items/enumerations.md
139138
[if let]: if-expr.md#if-let-expressions
140139
[if]: if-expr.md#if-expressions
141140
[loop]: loop-expr.md

0 commit comments

Comments
 (0)