We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3684d88 commit c88bcf3Copy full SHA for c88bcf3
compiler/rustc_mir_transform/src/lib.rs
@@ -360,16 +360,16 @@ fn mir_promoted(
360
361
fn mir_flags<'tcx>(tcx: TyCtxt<'tcx>, local_def_id: LocalDefId) -> MirFlags {
362
let mut flags = MirFlags::default();
363
- if !tcx.is_mir_available(local_def_id) {
364
- return flags;
365
- }
366
-
367
// Only perform check on functions because constants cannot call FFI functions.
368
let kind = tcx.def_kind(local_def_id);
369
if !kind.is_fn_like() {
370
return flags;
371
}
372
+ if !tcx.is_mir_available(local_def_id) {
+ return flags;
+ }
+
373
let body = &*tcx.mir_promoted(local_def_id).0.borrow();
374
375
if is_nounwind(body) {
0 commit comments