diff options
| author | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-11-13 14:03:22 -0500 |
|---|---|---|
| committer | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-12-27 20:59:21 -0500 |
| commit | e26366ad99a6da4df5c9b476eff00c48e50d1774 (patch) | |
| tree | 9e49dc2ff0bb1f0f76c9eaafa752e4abed816d4f /compiler/rustc_codegen_llvm/src | |
| parent | d41112a8c5f0b85649b4f0e1663edf15f7f2601e (diff) | |
| download | rust-e26366ad99a6da4df5c9b476eff00c48e50d1774.tar.gz rust-e26366ad99a6da4df5c9b476eff00c48e50d1774.zip | |
[WIP] UPDATE - migrate intrinsic.rs to new diagnostic infrastructure
WIP - replacing span_invalid_monomorphization_error function. Still in progress due to its use in codegen_llvm inside macros
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/intrinsic.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index 1ce48f82e1c..82c6c389494 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -10,6 +10,7 @@ use crate::value::Value; use rustc_codegen_ssa::base::{compare_simd_types, wants_msvc_seh}; use rustc_codegen_ssa::common::span_invalid_monomorphization_error; use rustc_codegen_ssa::common::{IntPredicate, TypeKind}; +use rustc_codegen_ssa::errors::InvalidMonomorphization; use rustc_codegen_ssa::mir::operand::OperandRef; use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::traits::*; @@ -284,15 +285,11 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { _ => bug!(), }, None => { - span_invalid_monomorphization_error( - tcx.sess, + tcx.sess.emit_err(InvalidMonomorphization::BasicIntegerType { span, - &format!( - "invalid monomorphization of `{}` intrinsic: \ - expected basic integer type, found `{}`", - name, ty - ), - ); + name, + ty, + }); return; } } |
