about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorKjetil Kjeka <kjetilkjeka@gmail.com>2023-10-27 00:47:52 +0200
committerKjetil Kjeka <kjetil@muybridge.com>2023-10-27 00:55:24 +0200
commit4d33876778011f7273ab3ebdbdbc35928832332b (patch)
treeee4cab29796ff27acdc789951aea49bb75664f10 /compiler/rustc_codegen_llvm/src
parent84c9c4aca7665e40986392845406a1b7524da07f (diff)
downloadrust-4d33876778011f7273ab3ebdbdbc35928832332b.tar.gz
rust-4d33876778011f7273ab3ebdbdbc35928832332b.zip
Documentation and error message improvements related to PassMode::Direct assert
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/abi.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs
index 6bface44a63..7d742ac732c 100644
--- a/compiler/rustc_codegen_llvm/src/abi.rs
+++ b/compiler/rustc_codegen_llvm/src/abi.rs
@@ -363,13 +363,13 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
                         // shouldn't let any more targets do that.
                         // (Also see <https://github.com/rust-lang/rust/issues/115666>.)
                         //
-                        // The unstable api `PtxKernel` also uses Direct for now.
+                        // The unstable abi `PtxKernel` also uses Direct for now.
                         // It needs to switch to something else before stabilization can happen.
                         // (Tracking issue abi_ptx: https://github.com/rust-lang/rust/issues/38788)
                         assert!(
                             matches!(&*cx.tcx.sess.target.arch, "wasm32" | "wasm64")
                                 || self.conv == Conv::PtxKernel,
-                            "`PassMode::Direct` for aggregates only allowed on wasm targets\nProblematic type: {:#?}",
+                            "`PassMode::Direct` for aggregates only allowed on wasm and `extern \"ptx-kernel\"` fns\nProblematic type: {:#?}",
                             arg.layout,
                         );
                     }