Skip to content

Commit ef04c90

Browse files
authored
Fix nits.
1 parent 994bfa5 commit ef04c90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/expressions.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ rvalue expression to a `'static` slot occurs when the expression could be
8989
written in a constant, borrowed, and dereferencing that borrow where the
9090
expression was the originally written, without changing the runtime behavior.
9191
That is, the promoted expression can be evaluated at compile-time and the
92-
resulting value does not contain interior mutability or destructors.
92+
resulting value does not contain interior mutability or destructors (these
93+
properties are determined based on the value where possible, e.g. `&None`
94+
always has the type `&'static Option<_>`, as it contains nothing disallowed).
9395
Otherwise, lifetime of temporary values is typically the innermost enclosing
9496
statement; the tail expression of a block is considered part of the statement
95-
that encloses the block
97+
that encloses the block.
9698

9799
When a temporary rvalue is being created that is assigned into a `let`
98100
declaration, however, the temporary is created with the lifetime of the

0 commit comments

Comments
 (0)