Don't suggest update nightly if using internal features

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-02-27 12:40:02 +00:00
parent a5245ef284
commit a0ca9b1633
No known key found for this signature in database
GPG Key ID: 95DDEBD74A1DC2C0
3 changed files with 7 additions and 28 deletions

View File

@ -1,10 +1,6 @@
driver_impl_ice = the compiler unexpectedly panicked. this is a bug.
driver_impl_ice_bug_report = we would appreciate a bug report: {$bug_report_url}
driver_impl_ice_bug_report_internal_feature = using internal features is not supported and expected to cause internal compiler errors when used incorrectly
driver_impl_ice_bug_report_internal_feature_outdated =
using internal features is not supported and expected to cause internal compiler errors when used incorrectly
.outdated = it seems this '{$version}' is outdated, a newer nightly should have been released in the mean time
.update = please consider running `rustup update nightly` to update the nightly channel and check if this problem still persists
driver_impl_ice_bug_report_outdated =
it seems this '{$version}' is outdated, a newer nightly should have been released in the mean time
.update = please consider running `rustup update nightly` to update the nightly channel and check if this problem still persists

View File

@ -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);

View File

@ -57,16 +57,6 @@ pub(crate) struct IceBugReportOutdated<'a> {
pub note_url: (),
}
#[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> {