From 1a17f0b775af8e7b6434370ee00b2230e4ff3b19 Mon Sep 17 00:00:00 2001 From: Kjetil Kjeka Date: Fri, 27 Oct 2023 00:47:52 +0200 Subject: [PATCH] Documentation and error message improvements related to PassMode::Direct assert Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com> --- compiler/rustc_codegen_llvm/src/abi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 6bface44a6305..9a4bded4d0c6c 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 .) // - // 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, ); }