Skip to content

Commit 51f7fba

Browse files
committed
CFG_RELEASE is mandatory, no need for option_env
The same file already contains another env!("CFG_RELEASE") on line 632, so it's impossible for this crate to compile without CFG_RELEASE set.
1 parent fd8907f commit 51f7fba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_attr/src/builtin.rs

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

2727
pub fn rust_version_symbol() -> Symbol {
28-
let version = option_env!("CFG_RELEASE").unwrap_or("<current>");
29-
Symbol::intern(&version)
28+
Symbol::intern(env!("CFG_RELEASE"))
3029
}
3130

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

0 commit comments

Comments
 (0)