Skip to content

Commit 66cc399

Browse files
authored
Rollup merge of rust-lang#137834 - lolbinarycat:rustc_fluent_macro-137815, r=BoxyUwU
rustc_fluent_macro: use CARGO_CRATE_NAME instead of CARGO_PKG_NAME fixes rust-lang#137815
2 parents 6d01ae8 + 38b364b commit 66cc399

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_fluent_macro/src/fluent.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ fn failed(crate_name: &Ident) -> proc_macro::TokenStream {
7878

7979
/// See [rustc_fluent_macro::fluent_messages].
8080
pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
81-
let crate_name = std::env::var("CARGO_PKG_NAME")
82-
// If `CARGO_PKG_NAME` is missing, then we're probably running in a test, so use
81+
let crate_name = std::env::var("CARGO_CRATE_NAME")
82+
// If `CARGO_CRATE_NAME` is missing, then we're probably running in a test, so use
8383
// `no_crate`.
8484
.unwrap_or_else(|_| "no_crate".to_string())
8585
.replace("rustc_", "");

0 commit comments

Comments
 (0)