Skip to content

Commit 0659e98

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 cd0b255 commit 0659e98

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,no_run
209209
# use core::cell::UnsafeCell;
@@ -320,8 +320,8 @@ The types of a const function's parameters and return type are restricted to tho
320320
[constant expressions]: #constant-expressions
321321
[constants]: items/constant-items.md
322322
[Const parameters]: items/generics.md
323-
[dereference expression]: expressions/operator-expr.md#the-dereference-operator
324-
[dereference operator]: expressions/operator-expr.md#the-dereference-operator
323+
[dereference expression]: expr.deref
324+
[dereference expressions]: expr.deref
325325
[destructors]: destructors.md
326326
[enum discriminants]: items/enumerations.md#discriminants
327327
[expression statements]: statements.md#expression-statements

0 commit comments

Comments
 (0)