]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/reference/src/expressions/operator-expr.md
New upstream version 1.38.0+dfsg1
[rustc.git] / src / doc / reference / src / expressions / operator-expr.md
index 428f053eff3d3be411cc2622db4d20206cecd0e1..f35d0328f980bbbd7eed39f45647a6ae24491b41 100644 (file)
@@ -85,14 +85,14 @@ let a = & & & & mut 10;
 >    `*` [_Expression_]
 
 The `*` (dereference) operator is also a unary prefix operator. When applied to
-a [pointer](types/pointer.html) it denotes the pointed-to location. If
+a [pointer](../types/pointer.md) it denotes the pointed-to location. If
 the expression is of type `&mut T` and `*mut T`, and is either a local
 variable, a (nested) field of a local variable or is a mutable [place
 expression], then the resulting memory location can be assigned to.
 Dereferencing a raw pointer requires `unsafe`.
 
 On non-pointer types `*x` is equivalent to `*std::ops::Deref::deref(&x)` in an
-[immutable place expression context](expressions.html#mutability) and
+[immutable place expression context](../expressions.md#mutability) and
 `*std::ops::DerefMut::deref_mut(&mut x)` in a mutable place expression context.
 
 ```rust
@@ -331,7 +331,7 @@ fn average(values: &[f64]) -> f64 {
 }
 ```
 
-`as` can be used to explicitly perform [coercions](type-coercions.html), as
+`as` can be used to explicitly perform [coercions](../type-coercions.md), as
 well as the following additional casts. Here `*T` means either `*const T` or
 `*mut T`.
 
@@ -345,7 +345,7 @@ well as the following additional casts. Here `*T` means either `*const T` or
 | `*T` where `T: Sized` | Numeric type          | Pointer to address cast          |
 | Integer type          | `*V` where `V: Sized` | Address to pointer cast          |
 | `&[T; n]`             | `*const T`            | Array to pointer cast            |
-| [Function pointer](types/function-pointer.html) | `*V` where `V: Sized` | Function pointer to pointer cast |
+| [Function pointer](../types/function-pointer.md) | `*V` where `V: Sized` | Function pointer to pointer cast |
 | Function pointer      | Integer               | Function pointer to address cast |
 | Closure \*\*          | Function pointer      | Closure to function pointer cast |
 
@@ -398,9 +398,9 @@ An _assignment expression_ consists of a [place expression] followed by an
 equals sign (`=`) and a [value expression]. Such an expression always has
 the [`unit` type].
 
-Evaluating an assignment expression [drops](destructors.html) the left-hand
+Evaluating an assignment expression [drops](../destructors.md) the left-hand
 operand, unless it's an uninitialized local variable or field of a local variable,
-and [either copies or moves](expressions.html#moved-and-copied-types) its
+and [either copies or moves](../expressions.md#moved-and-copied-types) its
 right-hand operand to its left-hand operand. The left-hand operand must be a
 place expression: using a value expression results in a compiler error, rather
 than promoting it to a temporary.
@@ -441,12 +441,12 @@ x += 4;
 assert_eq!(x, 14);
 ```
 
-[place expression]: expressions.html#place-expressions-and-value-expressions
-[value expression]: expressions.html#place-expressions-and-value-expressions
-[temporary value]: expressions.html#temporary-lifetimes
+[place expression]: ../expressions.md#place-expressions-and-value-expressions
+[value expression]: ../expressions.md#place-expressions-and-value-expressions
+[temporary value]: ../expressions.md#temporary-lifetimes
 [float-int]: https://github.com/rust-lang/rust/issues/10184
 [float-float]: https://github.com/rust-lang/rust/issues/15536
-[`unit` type]: types/tuple.html
+[`unit` type]: ../types/tuple.md
 
 [_BorrowExpression_]: #borrow-operators
 [_DereferenceExpression_]: #the-dereference-operator
@@ -459,5 +459,5 @@ assert_eq!(x, 14);
 [_AssignmentExpression_]: #assignment-expressions
 [_CompoundAssignmentExpression_]: #compound-assignment-expressions
 
-[_Expression_]: expressions.html
-[_TypeNoBounds_]: types.html#type-expressions
+[_Expression_]: ../expressions.md
+[_TypeNoBounds_]: ../types.md#type-expressions