Skip to content

Commit 3da65a1

Browse files
Havvyehuss
andauthored
Apply suggestions from code review
Co-authored-by: Eric Huss <[email protected]>
1 parent a065d3e commit 3da65a1

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/expressions/call-expr.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ let name: &'static str = (|| "Rust")();
2525
## Disambiguating Function Calls
2626

2727
All function calls are sugar for a more explicit [fully-qualified syntax].
28-
Upon compilation, Rust will desugar all function calls into the explicit form.
29-
Rust may sometimes require you to qualify function calls with trait, depending on the ambiguity of a call in light of in-scope items.
28+
Function calls may need to be fully qualified, depending on the ambiguity of a call in light of in-scope items.
3029

3130
> **Note**: In the past, the terms "Unambiguous Function Call Syntax", "Universal Function Call Syntax", or "UFCS", have been used in documentation, issues, RFCs, and other community writings.
3231
> However, these terms lack descriptive power and potentially confuse the issue at hand.

src/expressions/field-expr.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
> _FieldExpression_ :\
55
> &nbsp;&nbsp; [_Expression_] `.` [IDENTIFIER]
66
7-
A *field expression* is a [place expression] that evaluates to the location of a field of a type.
7+
A *field expression* is a [place expression] that evaluates to the location of a field of a [struct] or [union].
88
When the operand is [mutable], the field expression is also mutable.
99

1010
The syntax for a field expression is an operand, then a `.`, and finally an [identifier].
@@ -38,12 +38,12 @@ foo().x;
3838
3939
## Automatic dereferencing
4040

41-
Also, if the type of the operand implements [`Deref`] or [`DerefMut`][`Deref`] depending on whether the operand is [mutable], it is *automatically dereferenced* as many times as necessary to make the field access possible.
41+
If the type of the operand implements [`Deref`] or [`DerefMut`][`Deref`] depending on whether the operand is [mutable], it is *automatically dereferenced* as many times as necessary to make the field access possible.
4242
This processes is also called *autoderef* for short.
4343

4444
## Borrowing
4545

46-
Finally, the fields of a struct or a reference to a struct are treated as separate entities when borrowing.
46+
The fields of a struct or a reference to a struct are treated as separate entities when borrowing.
4747
If the struct does not implement [`Drop`] and is stored in a local variable, this also applies to moving out of each of its fields.
4848
This also does not apply if automatic dereferencing is done though user-defined types other than [`Box`].
4949

@@ -62,8 +62,8 @@ let d: String = x.f3; // Move out of x.f3
6262
```
6363

6464
[_Expression_]: ../expressions.md
65-
[`Box`]: ../special-types-and-traits.html#boxt
66-
[`Deref`]: ../special-types-and-traits.html#deref-and-derefmut
65+
[`Box`]: ../special-types-and-traits.md#boxt
66+
[`Deref`]: ../special-types-and-traits.md#deref-and-derefmut
6767
[`drop`]: ../special-types-and-traits.md#drop
6868
[IDENTIFIER]: ../identifiers.md
6969
[call expression]: call-expr.md

src/expressions/grouped-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
> _GroupedExpression_ :\
55
> &nbsp;&nbsp; `(` [_InnerAttribute_]<sup>\*</sup> [_Expression_] `)`
66
7-
A *parenthesized expression* wrap a single expression, evaluating to that expression.
7+
A *parenthesized expression* wraps a single expression, evaluating to that expression.
88
The syntax for a parenthesized expression is a `(`, then an operand, the *enclosed operand*, and then a `)`.
99

1010
An expression enclosed in parentheses evaluates to the value of the enclosed operand.

0 commit comments

Comments
 (0)