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.
This commit is contained in:
David Tolnay 2023-10-24 18:04:45 -07:00
parent fd8907f9cf
commit 51f7fbab92
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -25,8 +25,7 @@ use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause};
pub const VERSION_PLACEHOLDER: &str = "CURRENT_RUSTC_VERSION";
pub fn rust_version_symbol() -> Symbol {
let version = option_env!("CFG_RELEASE").unwrap_or("<current>");
Symbol::intern(&version)
Symbol::intern(env!("CFG_RELEASE"))
}
pub fn is_builtin_attr(attr: &Attribute) -> bool {