about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-03-06 12:22:22 -0500
committerGitHub <noreply@github.com>2025-03-06 12:22:22 -0500
commit56f0a60ccb79d10328aac615c458a94124051a1e (patch)
treecc805bb64f768a18df0947bf68a0f8b7c9ac4e3f
parent484d8dd5b4eeeea893d8163f7bee1fb1819b40b9 (diff)
parent38b364b29d67e8518614d19e18d822786f94d220 (diff)
downloadrust-56f0a60ccb79d10328aac615c458a94124051a1e.tar.gz
rust-56f0a60ccb79d10328aac615c458a94124051a1e.zip
Rollup merge of #137834 - lolbinarycat:rustc_fluent_macro-137815, r=BoxyUwU
rustc_fluent_macro: use CARGO_CRATE_NAME instead of CARGO_PKG_NAME

fixes #137815
-rw-r--r--compiler/rustc_fluent_macro/src/fluent.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_fluent_macro/src/fluent.rs b/compiler/rustc_fluent_macro/src/fluent.rs
index d4604c27e6d..b04fd1b48f7 100644
--- a/compiler/rustc_fluent_macro/src/fluent.rs
+++ b/compiler/rustc_fluent_macro/src/fluent.rs
@@ -78,8 +78,8 @@ fn failed(crate_name: &Ident) -> proc_macro::TokenStream {
 
 /// See [rustc_fluent_macro::fluent_messages].
 pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
-    let crate_name = std::env::var("CARGO_PKG_NAME")
-        // If `CARGO_PKG_NAME` is missing, then we're probably running in a test, so use
+    let crate_name = std::env::var("CARGO_CRATE_NAME")
+        // If `CARGO_CRATE_NAME` is missing, then we're probably running in a test, so use
         // `no_crate`.
         .unwrap_or_else(|_| "no_crate".to_string())
         .replace("rustc_", "");