Avoid unsafe in const macro translations except where necessary#1339
Avoid unsafe in const macro translations except where necessary#1339
unsafe in const macro translations except where necessary#1339Conversation
kkysen
left a comment
There was a problem hiding this comment.
See #1335 (review), too, but in general, what's the difference between the unsafe block for a const and the unsafe on an unsafe fn (which in the latest edition is meant to also be an unsafe block in the unsafe fn, too)? They seem exactly the same to me, and I think we should approach them the same. So a change like this (which I haven't looked through all of the details of yet) makes sense to me if it also applies to an unsafe fn. Note that there are often a bunch of unsafe fns that are fully safe and don't need the unsafe, and removing the unsafe for a const that doesn't need it and remove the unsafe for a fn that doesn't need it seem like the exact same problem.
The difference is that there is no unsafe block surrounding definitions of When we change the edition we target, it will make sense to use |
81551c0 to
ecddc95
Compare
23b03d6 to
190860a
Compare
190860a to
0ba0195
Compare
|
History is cleaned up now; this should be good to merge. |
0ba0195 to
b06febb
Compare
…for `--translate-const-macros conservative`" This reverts commit 3635b4e.
b06febb to
7dbe6b1
Compare
CI on this ran before #1339 merged
CI on this ran before #1339 merged
CI on this ran before #1339 merged
Atop #1306, as I'd rather not regress all const translations to be
unsafein master now that we translate const macros by default.