about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
index fe4f073f799..16a550f45b8 100644
--- a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
+++ b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
@@ -12,7 +12,7 @@ fn report_simd_type_validation_error(
     span: Span,
     ty: Ty<'_>,
 ) {
-    fx.tcx.sess.span_err(span, format!("invalid monomorphization of `{}` intrinsic: expected SIMD input type, found non-SIMD `{}`", intrinsic, ty));
+    fx.tcx.dcx().span_err(span, format!("invalid monomorphization of `{}` intrinsic: expected SIMD input type, found non-SIMD `{}`", intrinsic, ty));
     // Prevent verifier error
     fx.bcx.ins().trap(TrapCode::UnreachableCodeReached);
 }
@@ -192,7 +192,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
                     .try_into()
                     .unwrap(),
                 _ => {
-                    fx.tcx.sess.span_err(
+                    fx.tcx.dcx().span_err(
                         span,
                         format!("simd_shuffle index must be an array of `u32`, got `{}`", idx_ty),
                     );
@@ -278,7 +278,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
             {
                 idx_const
             } else {
-                fx.tcx.sess.span_fatal(span, "Index argument for `simd_insert` is not a constant");
+                fx.tcx.dcx().span_fatal(span, "Index argument for `simd_insert` is not a constant");
             };
 
             let idx: u32 = idx_const
@@ -286,7 +286,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
                 .unwrap_or_else(|_| panic!("kind not scalar: {:?}", idx_const));
             let (lane_count, _lane_ty) = base.layout().ty.simd_size_and_type(fx.tcx);
             if u64::from(idx) >= lane_count {
-                fx.tcx.sess.span_fatal(
+                fx.tcx.dcx().span_fatal(
                     fx.mir.span,
                     format!("[simd_insert] idx {} >= lane_count {}", idx, lane_count),
                 );
@@ -316,7 +316,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
             {
                 idx_const
             } else {
-                fx.tcx.sess.span_warn(span, "Index argument for `simd_extract` is not a constant");
+                fx.tcx.dcx().span_warn(span, "Index argument for `simd_extract` is not a constant");
                 let trap_block = fx.bcx.create_block();
                 let true_ = fx.bcx.ins().iconst(types::I8, 1);
                 let ret_block = fx.get_block(target);
@@ -334,7 +334,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
                 .unwrap_or_else(|_| panic!("kind not scalar: {:?}", idx_const));
             let (lane_count, _lane_ty) = v.layout().ty.simd_size_and_type(fx.tcx);
             if u64::from(idx) >= lane_count {
-                fx.tcx.sess.span_fatal(
+                fx.tcx.dcx().span_fatal(
                     fx.mir.span,
                     format!("[simd_extract] idx {} >= lane_count {}", idx, lane_count),
                 );
@@ -859,7 +859,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
             match lane_ty.kind() {
                 ty::Int(_) | ty::Uint(_) => {}
                 _ => {
-                    fx.tcx.sess.span_fatal(
+                    fx.tcx.dcx().span_fatal(
                         span,
                         format!(
                             "invalid monomorphization of `simd_bitmask` intrinsic: \
@@ -899,7 +899,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
                         && len.try_eval_target_usize(fx.tcx, ty::ParamEnv::reveal_all())
                             == Some(expected_bytes) => {}
                 _ => {
-                    fx.tcx.sess.span_fatal(
+                    fx.tcx.dcx().span_fatal(
                         span,
                         format!(
                             "invalid monomorphization of `simd_bitmask` intrinsic: \
@@ -1086,7 +1086,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
         }
 
         _ => {
-            fx.tcx.sess.span_err(span, format!("Unknown SIMD intrinsic {}", intrinsic));
+            fx.tcx.dcx().span_err(span, format!("Unknown SIMD intrinsic {}", intrinsic));
             // Prevent verifier error
             fx.bcx.ins().trap(TrapCode::UnreachableCodeReached);
             return;