Skip to content

Commit 649bc11

Browse files
committed
Took Wesley's advice and added an extra note at the outset that the scope of the
problem described in this post is limited to the intersection of const-eval and unsafe.
1 parent 8f1060a commit 649bc11

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

posts/2022-09-15-const-eval-safety-rule-revision.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ team: The Compiler Team <https://www.rust-lang.org/governance/teams/compiler>
88

99
In a recent Rust issue ([#99923][]), a developer noted that the upcoming
1010
1.64-beta version of Rust had started signalling errors on their crate,
11-
[`icu4x`][icu4x]. The `icu4x` crate makes heavy use of *const-eval*: Rust code
12-
that is run at compile-time but produces values that may end up embedded in the
11+
[`icu4x`][icu4x]. The `icu4x` crate uses unsafe code during const evaluation.
12+
*Const evaluation*, or just "const-eval",
13+
runs at compile-time but produces values that may end up embedded in the
1314
final object code that executes at runtime.
1415

1516
Rust's const-eval system supports both safe and unsafe Rust, but the rules for
1617
what unsafe code is allowed to do during const-eval are even more strict than
1718
what is allowed for unsafe code at runtime. This post is going to go into detail
1819
about one of those rules.
1920

20-
(If your `const` code does not use any `unsafe` blocks or call any `const fn`
21+
(Note: If your `const` code does not use any `unsafe` blocks or call any `const fn`
2122
with an `unsafe` block, then you do not need to worry about this!)
2223

2324
<!--

0 commit comments

Comments
 (0)