Skip to content

Commit 3dab34b

Browse files
committed
Say "dereference expressions" in constant exprs list
To define what's allowed in a constant expression, we have a list that starts with the text: > The following expressions are constant expressions... Correspondingly, most of the items in this list are stated in terms of being a "this expression" or a "that expression". However, for deref, we had instead said "the dereference operator". Even though the `expr.deref` section is currently titled "the dereference operator", it seems more clear and consistent in the context of this list to talk about dereference expressions, so let's do that. These are expressions, after all, The grammar production is named `DereferenceExpression`. (There is one other place in the list that we talk about operators: "built-in negation, arithmetic, logical, comparison, or lazy boolean operators used on integer and floating point types, `bool`, and `char`." Perhaps we'll reword that one later. It stands out a bit less than this one did.)
1 parent 8af6903 commit 3dab34b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/const_eval.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ r[const-eval.const-expr.borrows]
203203
> See [issue #143129](https://github.com/rust-lang/rust/issues/143129) for more details.
204204
205205
r[const-eval.const-expr.deref]
206-
* The [dereference operator].
206+
* [Dereference expressions].
207207
208208
```rust
209209
# use core::cell::UnsafeCell;
@@ -318,8 +318,8 @@ The types of a const function's parameters and return type are restricted to tho
318318
[constant expressions]: #constant-expressions
319319
[constants]: items/constant-items.md
320320
[Const parameters]: items/generics.md
321-
[dereference expression]: expressions/operator-expr.md#the-dereference-operator
322-
[dereference operator]: expressions/operator-expr.md#the-dereference-operator
321+
[dereference expression]: expr.deref
322+
[dereference expressions]: expr.deref
323323
[destructors]: destructors.md
324324
[enum discriminants]: items/enumerations.md#discriminants
325325
[expression statements]: statements.md#expression-statements

0 commit comments

Comments
 (0)