File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,14 @@ compiler highlights the expression where we can first witness UB: the original
171
171
transmute itself! (Which was stated at the outset of this post; here we are just
172
172
pointing out that these tools can pinpoint the injection point more precisely.)
173
173
174
+ Why not have these extra const-ub checks on by default? Well, the checks
175
+ introduce performance overhead upon Rust compilation time, and we do not know if
176
+ that overhead can be made acceptable. However, [ recent debate] [ perf argument ]
177
+ among Miri developers indicates that the inherent cost here might not be as bad
178
+ as they had originally thought.
179
+
180
+ [ perf argument ] : https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bsteering.20meeting.5D.202022-09-02.20const-eval.20and.20future-compa.2E.2E.2E/near/296853344
181
+
174
182
## Change is hard
175
183
176
184
You might well be wondering at this point: "Wait, when * is* it okay to transmute
You can’t perform that action at this time.
0 commit comments