We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
-Zthir-unsafeck
1 parent 3bc9dd0 commit 40b57beCopy full SHA for 40b57be
compiler/rustc_mir/src/transform/mod.rs
@@ -259,10 +259,12 @@ fn mir_const<'tcx>(
259
}
260
261
// Unsafety check uses the raw mir, so make sure it is run.
262
- if let Some(param_did) = def.const_param_did {
263
- tcx.ensure().unsafety_check_result_for_const_arg((def.did, param_did));
264
- } else {
265
- tcx.ensure().unsafety_check_result(def.did);
+ if !tcx.sess.opts.debugging_opts.thir_unsafeck {
+ if let Some(param_did) = def.const_param_did {
+ tcx.ensure().unsafety_check_result_for_const_arg((def.did, param_did));
+ } else {
266
+ tcx.ensure().unsafety_check_result(def.did);
267
+ }
268
269
270
let mut body = tcx.mir_built(def).steal();
0 commit comments