]> git.lizzy.rs Git - rust.git/blobdiff - src/base.rs
Rustup to rustc 1.46.0-nightly (7750c3d46 2020-06-26)
[rust.git] / src / base.rs
index ee4af783d9f9a28cc22ead32ccb94f1d6c0c7278..8d2087b352831897b376811f3933f01eac027b0e 100644 (file)
@@ -61,7 +61,7 @@ pub(crate) fn trans_fn<'tcx, B: Backend + 'static>(
         crate::trap::trap_unreachable(&mut fx, "function has uninhabited argument");
     } else {
         tcx.sess.time("codegen clif ir", || {
-            tcx.sess.time("codegen prelude", || crate::abi::codegen_fn_prelude(&mut fx, start_block, true));
+            tcx.sess.time("codegen prelude", || crate::abi::codegen_fn_prelude(&mut fx, start_block));
             codegen_fn_content(&mut fx);
         });
     }
@@ -134,12 +134,12 @@ pub(crate) fn trans_fn<'tcx, B: Backend + 'static>(
 
 pub(crate) fn verify_func(tcx: TyCtxt<'_>, writer: &crate::pretty_clif::CommentWriter, func: &Function) {
     tcx.sess.time("verify clif ir", || {
-        let flags = settings::Flags::new(settings::builder());
-        match ::cranelift_codegen::verify_function(&func, &flags) {
+        let flags = cranelift_codegen::settings::Flags::new(cranelift_codegen::settings::builder());
+        match cranelift_codegen::verify_function(&func, &flags) {
             Ok(_) => {}
             Err(err) => {
                 tcx.sess.err(&format!("{:?}", err));
-                let pretty_error = ::cranelift_codegen::print_errors::pretty_verifier_error(
+                let pretty_error = cranelift_codegen::print_errors::pretty_verifier_error(
                     &func,
                     None,
                     Some(Box::new(writer)),
@@ -219,7 +219,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, impl Backend>) {
                 cleanup: _,
             } => {
                 if !fx.tcx.sess.overflow_checks() {
-                    if let mir::AssertKind::OverflowNeg = *msg {
+                    if let mir::AssertKind::OverflowNeg(_) = *msg {
                         let target = fx.get_block(*target);
                         fx.bcx.ins().jump(target, &[]);
                         continue;
@@ -323,7 +323,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, impl Backend>) {
 
                         // Black box
                     }
-                    _ => unimpl_fatal!(fx.tcx, bb_data.terminator().source_info.span, "Inline assembly is not supported"),
+                    _ => fx.tcx.sess.span_fatal(bb_data.terminator().source_info.span, "Inline assembly is not supported"),
                 }
             }
             TerminatorKind::Resume | TerminatorKind::Abort => {
@@ -340,11 +340,11 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, impl Backend>) {
                 bug!("shouldn't exist at trans {:?}", bb_data.terminator());
             }
             TerminatorKind::Drop {
-                location,
+                place,
                 target,
                 unwind: _,
             } => {
-                let drop_place = trans_place(fx, *location);
+                let drop_place = trans_place(fx, *place);
                 crate::abi::codegen_drop(fx, bb_data.terminator().source_info.span, drop_place);
 
                 let target_block = fx.get_block(*target);
@@ -363,7 +363,7 @@ fn trans_stmt<'tcx>(
     cur_block: Block,
     stmt: &Statement<'tcx>,
 ) {
-    let _print_guard = PrintOnPanic(|| format!("stmt {:?}", stmt));
+    let _print_guard = crate::PrintOnPanic(|| format!("stmt {:?}", stmt));
 
     fx.set_debug_loc(stmt.source_info);
 
@@ -691,7 +691,7 @@ fn is_fat_ptr<'tcx>(
                 "int $$0x29" => {
                     crate::trap::trap_unimplemented(fx, "Windows abort");
                 }
-                _ => unimpl_fatal!(fx.tcx, stmt.source_info.span, "Inline assembly is not supported"),
+                _ => fx.tcx.sess.span_fatal(stmt.source_info.span, "Inline assembly is not supported"),
             }
         }
     }