about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-02-24 02:47:59 +0000
committerTrevor Gross <tmgross@umich.edu>2025-02-24 03:33:16 +0000
commit63a3ab4fae27ffc6af807598a5634546f9c05a9f (patch)
treeaca1c76616586c4afd46c21f0838a63c52a9c800 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent35a43a4833c032c975b97beccf266facf4583a63 (diff)
downloadrust-63a3ab4fae27ffc6af807598a5634546f9c05a9f.tar.gz
rust-63a3ab4fae27ffc6af807598a5634546f9c05a9f.zip
Add a span to `CompilerBuiltinsCannotCall`
Currently, this error emit a diagnostic with no context like:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `<math::libm::support::hex_float::Hexf<i32> as core::fmt::LowerHex>::fmt` to `core::fmt::num::<impl core::fmt::LowerHex for i32>::fmt`

With this change, it at least usually points to the problematic
function:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `<math::libm::support::hex_float::Hexf<i32> as core::fmt::LowerHex>::fmt` to `core::fmt::num::<impl core::fmt::LowerHex for i32>::fmt`
       --> src/../libm/src/math/support/hex_float.rs:270:5
        |
    270 |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions