]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir/src/transform/inline.rs
Rollup merge of #82789 - csmoe:issue-82772, r=estebank
[rust.git] / compiler / rustc_mir / src / transform / inline.rs
index 16410175bd25b1d9569d06e517c6f8d29f4a7d4c..cf85503b3d54b3ed0b1b511d945133c15f736352 100644 (file)
@@ -52,7 +52,7 @@ struct CallSite<'tcx> {
         return enabled;
     }
 
-    tcx.sess.opts.debugging_opts.mir_opt_level >= 2
+    tcx.sess.mir_opt_level() >= 3
 }
 
 impl<'tcx> MirPass<'tcx> for Inline {
@@ -220,7 +220,7 @@ fn check_mir_is_available(
             // since their `optimized_mir` is used for layout computation, which can
             // create a cycle, even when no attempt is made to inline the function
             // in the other direction.
-            if caller_body.generator_kind.is_some() {
+            if caller_body.generator.is_some() {
                 return Err("local generator (query cycle avoidance)");
             }