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
The example for the tuple enum variant constructor should go above the
example that already uses a tuple enum variant constructor in a nested
manner. This also matches the order in the list of extending
expressions above -- the list items for tuple struct constructors and
tuple enum variant constructors come after tuple expressions and
before block expressions.
For demonstrating a tuple enum variant constructor, it's better to use
`Some(_)` than to define one; `Option<T>` is well known enough.
For the tuple struct that we need to define, let's use a short name
like `W<T>` here rather than `TupleStruct<T>` (and show its
definition). When I see a name like `TupleStruct`, it takes me a
moment to confirm it's just a name and not more than that. We use
this `W<T>(T)` "wrapper" tuple struct definition elsewhere in the
Reference.
As a wording matter, we say "argument to" rather than "argument of".
Similarly, something isn't an argument to a tuple struct but an
argument to the tuple struct constructor, so let's say that.
0 commit comments