Skip to content

Commit 4cec09a

Browse files
committed
Pre-intern a symbol for env!("CFG_RELEASE")
1 parent 14551c4 commit 4cec09a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_attr/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause};
2424
pub const VERSION_PLACEHOLDER: &str = "CURRENT_RUSTC_VERSION";
2525

2626
pub fn rust_version_symbol() -> Symbol {
27-
Symbol::intern(env!("CFG_RELEASE"))
27+
sym::env_CFG_RELEASE
2828
}
2929

3030
pub fn is_builtin_attr(attr: &Attribute) -> bool {

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ symbols! {
713713
encode,
714714
end,
715715
env,
716+
env_CFG_RELEASE: env!("CFG_RELEASE"),
716717
eprint_macro,
717718
eprintln_macro,
718719
eq,

0 commit comments

Comments
 (0)