diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-27 12:40:02 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-27 12:40:02 +0000 |
| commit | a0ca9b16338be84a520dd842d351de0679d5e2f1 (patch) | |
| tree | 0458fa81a84bff4b7184f70410af4ddf98513ac0 /compiler/rustc_driver_impl/src | |
| parent | a5245ef284f70e048e9a4f6bbe1678067d0a3bb6 (diff) | |
| download | rust-a0ca9b16338be84a520dd842d351de0679d5e2f1.tar.gz rust-a0ca9b16338be84a520dd842d351de0679d5e2f1.zip | |
Don't suggest update nightly if using internal features
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 21 | ||||
| -rw-r--r-- | compiler/rustc_driver_impl/src/session_diagnostics.rs | 10 |
2 files changed, 7 insertions, 24 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index fcf18b67497..95747ee6cd5 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -1415,21 +1415,14 @@ fn report_ice( && let ver_datetime = OffsetDateTime::new_utc(ver_date, Time::MIDNIGHT) && let system_datetime = OffsetDateTime::from(SystemTime::now()) && system_datetime.checked_sub(36.hours()).is_some_and(|d| d > ver_datetime) + && !using_internal_features.load(std::sync::atomic::Ordering::Relaxed) { - if using_internal_features.load(std::sync::atomic::Ordering::Relaxed) { - dcx.emit_note(session_diagnostics::IceBugReportInternalFeatureOutdated { - version, - note_update: (), - note_outdated: (), - }); - } else { - dcx.emit_note(session_diagnostics::IceBugReportOutdated { - version, - bug_report_url, - note_update: (), - note_url: (), - }); - } + dcx.emit_note(session_diagnostics::IceBugReportOutdated { + version, + bug_report_url, + note_update: (), + note_url: (), + }); } else { if using_internal_features.load(std::sync::atomic::Ordering::Relaxed) { dcx.emit_note(session_diagnostics::IceBugReportInternalFeature); diff --git a/compiler/rustc_driver_impl/src/session_diagnostics.rs b/compiler/rustc_driver_impl/src/session_diagnostics.rs index 0c3909e68ca..62d0da62d2a 100644 --- a/compiler/rustc_driver_impl/src/session_diagnostics.rs +++ b/compiler/rustc_driver_impl/src/session_diagnostics.rs @@ -58,16 +58,6 @@ pub(crate) struct IceBugReportOutdated<'a> { } #[derive(Diagnostic)] -#[diag(driver_impl_ice_bug_report_internal_feature_outdated)] -pub(crate) struct IceBugReportInternalFeatureOutdated<'a> { - pub version: &'a str, - #[note(driver_impl_outdated)] - pub note_outdated: (), - #[note(driver_impl_update)] - pub note_update: (), -} - -#[derive(Diagnostic)] #[diag(driver_impl_ice_version)] pub(crate) struct IceVersion<'a> { pub version: &'a str, |
