10000 add wesley's example of an adverse compile-time effect · borngraced/blog.rust-lang.org@a2428d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2428d4

Browse files
add wesley's example of an adverse compile-time effect
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
1 parent 2559b09 commit a2428d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ rules governing Rust's runtime semantics. (In other words, *more* code is
7979
classified as "UB" than you may have otherwise realized.)
8080

8181
If you hit undefined behavior during const-eval, the Rust compiler will protect
82-
itself from [adverse effects][const-ub-guide], but there are few guarantees
82+
itself from [adverse effects][const-ub-guide] such as the undefined
83+
behavior leaking into the type system, but there are few guarantees
8384
other than that. For example, compile-time UB could lead to runtime UB.
8485
Furthermore, if you have UB at const-eval time, there is no guarantee that your
8586
code will be accepted from one compiler version to another.

0 commit comments

Comments
 (0)
0