Skip to content

Commit 4afe310

Browse files
committed
Fix broken link by adding comma
1 parent 169c988 commit 4afe310

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/doc/rust.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,7 +2541,7 @@ A temporary's lifetime equals the largest lifetime of any reference that points
25412541
#### Moved and copied types
25422542

25432543
When a [local variable](#memory-slots) is used
2544-
as an [rvalue](#lvalues-rvalues-and-temporaries)
2544+
as an [rvalue](#lvalues,-rvalues-and-temporaries)
25452545
the variable will either be moved or copied, depending on its type.
25462546
For types that contain [owning pointers](#pointer-types)
25472547
or values that implement the special trait `Drop`,
@@ -2564,7 +2564,7 @@ string, boolean value, or the unit value.
25642564
### Path expressions
25652565

25662566
A [path](#paths) used as an expression context denotes either a local variable or an item.
2567-
Path expressions are [lvalues](#lvalues-rvalues-and-temporaries).
2567+
Path expressions are [lvalues](#lvalues,-rvalues-and-temporaries).
25682568

25692569
### Tuple expressions
25702570

@@ -2677,7 +2677,7 @@ foo().x;
26772677
(Struct {a: 10, b: 20}).a;
26782678
~~~~
26792679

2680-
A field access is an [lvalue](#lvalues-rvalues-and-temporaries) referring to the value of that field.
2680+
A field access is an [lvalue](#lvalues,-rvalues-and-temporaries) referring to the value of that field.
26812681
When the type providing the field inherits mutabilty, it can be [assigned](#assignment-expressions) to.
26822682

26832683
Also, if the type of the expression to the left of the dot is a pointer,
@@ -2713,7 +2713,7 @@ idx_expr : expr '[' expr ']' ;
27132713

27142714
[Vector](#vector-types)-typed expressions can be indexed by writing a
27152715
square-bracket-enclosed expression (the index) after them. When the
2716-
vector is mutable, the resulting [lvalue](#lvalues-rvalues-and-temporaries) can be assigned to.
2716+
vector is mutable, the resulting [lvalue](#lvalues,-rvalues-and-temporaries) can be assigned to.
27172717

27182718
Indices are zero-based, and may be of any integral type. Vector access
27192719
is bounds-checked at run-time. When the check fails, it will put the
@@ -2739,7 +2739,7 @@ before the expression they apply to.
27392739
: Negation. May only be applied to numeric types.
27402740
* `*`
27412741
: Dereference. When applied to a [pointer](#pointer-types) it denotes the pointed-to location.
2742-
For pointers to mutable locations, the resulting [lvalue](#lvalues-rvalues-and-temporaries) can be assigned to.
2742+
For pointers to mutable locations, the resulting [lvalue](#lvalues,-rvalues-and-temporaries) can be assigned to.
27432743
On non-pointer types, it calls the `deref` method of the `std::ops::Deref` trait, or the
27442744
`deref_mut` method of the `std::ops::DerefMut` trait (if implemented by the type and required
27452745
for an outer expression that will or could mutate the dereference), and produces the
@@ -2874,8 +2874,8 @@ fn avg(v: &[f64]) -> f64 {
28742874

28752875
#### Assignment expressions
28762876

2877-
An _assignment expression_ consists of an [lvalue](#lvalues-rvalues-and-temporaries) expression followed by an
2878-
equals sign (`=`) and an [rvalue](#lvalues-rvalues-and-temporaries) expression.
2877+
An _assignment expression_ consists of an [lvalue](#lvalues,-rvalues-and-temporaries) expression followed by an
2878+
equals sign (`=`) and an [rvalue](#lvalues,-rvalues-and-temporaries) expression.
28792879

28802880
Evaluating an assignment expression [either copies or moves](#moved-and-copied-types) its right-hand operand to its left-hand operand.
28812881

@@ -3188,7 +3188,7 @@ fn main() {
31883188
~~~~
31893189

31903190
A `match` behaves differently depending on whether or not the head expression
3191-
is an [lvalue or an rvalue](#lvalues-rvalues-and-temporaries).
3191+
is an [lvalue or an rvalue](#lvalues,-rvalues-and-temporaries).
31923192
If the head expression is an rvalue, it is
31933193
first evaluated into a temporary location, and the resulting value
31943194
is sequentially compared to the patterns in the arms until a match
@@ -3552,7 +3552,7 @@ There are four varieties of pointer in Rust:
35523552
: These point to memory _owned by some other value_.
35533553
References arise by (automatic) conversion from owning pointers, managed pointers,
35543554
or by applying the borrowing operator `&` to some other value,
3555-
including [lvalues, rvalues or temporaries](#lvalues-rvalues-and-temporaries).
3555+
including [lvalues, rvalues or temporaries](#lvalues,-rvalues-and-temporaries).
35563556
References are written `&content`, or in some cases `&'f content` for some lifetime-variable `f`,
35573557
for example `&int` means a reference to an integer.
35583558
Copying a reference is a "shallow" operation:
@@ -3854,7 +3854,7 @@ references to any boxes; the remainder of its heap is immediately freed.
38543854
A task's stack contains slots.
38553855

38563856
A _slot_ is a component of a stack frame, either a function parameter,
3857-
a [temporary](#lvalues-rvalues-and-temporaries), or a local variable.
3857+
a [temporary](#lvalues,-rvalues-and-temporaries), or a local variable.
38583858

38593859
A _local variable_ (or *stack-local* allocation) holds a value directly,
38603860
allocated within the stack's memory. The value is a part of the stack frame.

0 commit comments

Comments
 (0)