diff --git a/compiler/rustc_codegen_llvm/messages.ftl b/compiler/rustc_codegen_llvm/messages.ftl index 85cb7499cca4e..14cbb7edf1547 100644 --- a/compiler/rustc_codegen_llvm/messages.ftl +++ b/compiler/rustc_codegen_llvm/messages.ftl @@ -61,7 +61,7 @@ codegen_llvm_symbol_already_defined = codegen_llvm_target_machine = could not create LLVM TargetMachine for triple: {$triple} codegen_llvm_target_machine_with_llvm_err = could not create LLVM TargetMachine for triple: {$triple}: {$llvm_err} -codegen_llvm_unknown_debuginfo_compression = unknown debuginfo compression algorithm {$algorithm} - will fall back to uncompressed debuginfo +codegen_llvm_unsupported_debuginfo_compression = unsupported debuginfo compression algorithm {$algorithm} - will fall back to uncompressed debuginfo codegen_llvm_write_bytecode = failed to write bytecode to {$path}: {$err} diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index fb07794e1bba3..246b7dfe10e02 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -38,7 +38,7 @@ use crate::builder::SBuilder; use crate::builder::gpu_offload::scalar_width; use crate::common::AsCCharPtr; use crate::errors::{ - CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, UnknownCompression, + CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, UnsupportedCompression, WithLlvmError, WriteBytecode, }; use crate::llvm::diagnostic::OptimizationDiagnosticKind::*; @@ -259,7 +259,7 @@ pub(crate) fn target_machine_factory( if llvm::LLVMRustLLVMHasZlibCompression() { llvm::CompressionKind::Zlib } else { - sess.dcx().emit_warn(UnknownCompression { algorithm: "zlib" }); + sess.dcx().emit_warn(UnsupportedCompression { algorithm: "zlib" }); llvm::CompressionKind::None } } @@ -267,7 +267,7 @@ pub(crate) fn target_machine_factory( if llvm::LLVMRustLLVMHasZstdCompression() { llvm::CompressionKind::Zstd } else { - sess.dcx().emit_warn(UnknownCompression { algorithm: "zstd" }); + sess.dcx().emit_warn(UnsupportedCompression { algorithm: "zstd" }); llvm::CompressionKind::None } } diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs index bd42cf5569664..e61a60088dff0 100644 --- a/compiler/rustc_codegen_llvm/src/errors.rs +++ b/compiler/rustc_codegen_llvm/src/errors.rs @@ -169,8 +169,8 @@ pub(crate) struct CopyBitcode { } #[derive(Diagnostic)] -#[diag(codegen_llvm_unknown_debuginfo_compression)] -pub(crate) struct UnknownCompression { +#[diag(codegen_llvm_unsupported_debuginfo_compression)] +pub(crate) struct UnsupportedCompression { pub algorithm: &'static str, } diff --git a/tests/run-make/compressed-debuginfo/rmake.rs b/tests/run-make/compressed-debuginfo/rmake.rs index 5ba1a1852d51b..c8bde9cfa221f 100644 --- a/tests/run-make/compressed-debuginfo/rmake.rs +++ b/tests/run-make/compressed-debuginfo/rmake.rs @@ -23,7 +23,7 @@ fn check_compression(compression: &str, to_find: &str) { } else { assert_contains( stderr, - format!("unknown debuginfo compression algorithm {compression}"), + format!("unsupported debuginfo compression algorithm {compression}"), ); } });