We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 790a790 + 5bcc522 commit cc2711cCopy full SHA for cc2711c
promotion.md
@@ -14,7 +14,7 @@ There are a few different contexts where promotion is beneficial.
14
Instead of putting it on the stack, the `3` is allocated in global static memory
15
and a reference with lifetime `'static` is provided. This is essentially an
16
automatic transformation turning `&EXPR` into
17
-`{ const _PROMOTED = &EXPR; EXPR}`, but only if `EXPR` qualifies.
+`{ const _PROMOTED = &EXPR; _PROMOTED }`, but only if `EXPR` qualifies.
18
19
Note that promotion happens on the MIR, not on surface-level syntax. This is
20
relevant when discussing e.g. handling of panics caused by overflowing
0 commit comments