Skip to content

Commit 10543e9

Browse files
Fix error regarding explicit promotion in consts
1 parent 4b4e01f commit 10543e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

promotion.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ Strictly speaking, lifetime extension in a const-context is not promotion; it
7979
does not create `promoted`s in the MIR. However the same rules for
8080
promotability apply inside a const-context as outside.
8181

82-
It's an open question whether lifetime extension within a `const` or `static`
83-
should be an implicit or explicit context. Currently it is treated as an
84-
implicit one.
82+
All contexts are treated as explicit ones when determining promotability within
83+
a `const` or `static` initializer because the user has requested that their
84+
code run at compile-time anyway.
8585

8686
## Promotability
8787

0 commit comments

Comments
 (0)