Skip to content

Commit cc2711c

Browse files
authored
Merge pull request #62 from RalfJung/typo
promotion.md: fix typo
2 parents 790a790 + 5bcc522 commit cc2711c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

promotion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ There are a few different contexts where promotion is beneficial.
1414
Instead of putting it on the stack, the `3` is allocated in global static memory
1515
and a reference with lifetime `'static` is provided. This is essentially an
1616
automatic transformation turning `&EXPR` into
17-
`{ const _PROMOTED = &EXPR; EXPR}`, but only if `EXPR` qualifies.
17+
`{ const _PROMOTED = &EXPR; _PROMOTED }`, but only if `EXPR` qualifies.
1818

1919
Note that promotion happens on the MIR, not on surface-level syntax. This is
2020
relevant when discussing e.g. handling of panics caused by overflowing

0 commit comments

Comments
 (0)