Skip to content

Commit 3e2d2ef

Browse files
authored
fix(promotion): fix anchor static access to access-static
1 parent a1e73fe commit 3e2d2ef

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

promotion.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ are evaluated. We thus can be more relaxed about promotion; in practice, what
7171
this means is that we will promote calls to arbitrary `const fn`, not just those
7272
marked `#[rustc_promotable]`.
7373

74+
[See below][access-static] for another special case in promotion analysis: accesses and references to statics are only promoted inside other statics.
75+
7476
[warn-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1229-compile-time-asserts.md
7577

7678
## "enclosing scope" rule

0 commit comments

Comments
 (0)