Skip to content

Commit ea29866

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_attr/src/builtin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +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-
let version = option_env!("CFG_RELEASE").unwrap_or("<current>");
28-
Symbol::intern(&version)
27+
Symbol::intern(env!("CFG_RELEASE"))
2928
}
3029

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

0 commit comments

Comments
 (0)