Skip to content

Commit

Permalink
Unrolled build for rust-lang#137834
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rust-timer authored Mar 7, 2025
2 parents b74da96 + 38b364b commit e571709
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_fluent_macro/src/fluent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_", "");
Expand Down

0 comments on commit e571709

Please sign in to comment.