Skip to content

Commit b515180

Browse files
committed
edits
1 parent 7983e46 commit b515180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/0000-const-ub.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Summary
77
[summary]: #summary
88

9-
Define UB during const evaluation to lead to an unspecified result for the affected CTFE query, but not otherwise infect the compilation process.
9+
Define UB during const evaluation to lead to an unspecified result or hard error for the affected CTFE query, but not otherwise infect the compilation process.
1010

1111
# Motivation
1212
[motivation]: #motivation
@@ -63,7 +63,7 @@ None of this is *guaranteed*, and `rustc` may relax or otherwise change its UB c
6363
# Reference-level explanation
6464
[reference-level-explanation]: #reference-level-explanation
6565

66-
When UB arises as part of CTFE, the result of this evaluation is an unspecified constant, i.e., it is arbitrary, and might not even be of the right type.
66+
When UB arises as part of CTFE, the result of this evaluation is an unspecified constant, i.e., it is arbitrary, and might not even be valid for the expected return type of this evaluation.
6767
The compiler might be able to detect that UB occurred and raise an error or a warning, but this is not mandated, and absence of lints does not imply absence of UB.
6868
However, the rest of the compiler will continue to function properly, and compilation *itself* will not raise UB.
6969

0 commit comments

Comments
 (0)