Use bool in favor of Option<()> for diagnostics

This commit is contained in:
Michael Goulet
2024-08-21 00:57:58 -04:00
parent 4d5b3b1962
commit 25ff9b6bcb
48 changed files with 106 additions and 121 deletions

View File

@@ -161,7 +161,7 @@ pub(crate) struct UnsafeOpInUnsafeFnCallToFunctionWithRequiresUnsafe {
pub(crate) missing_target_features: DiagArgValue,
pub(crate) missing_target_features_count: usize,
#[note]
pub(crate) note: Option<()>,
pub(crate) note: bool,
pub(crate) build_target_features: DiagArgValue,
pub(crate) build_target_features_count: usize,
#[subdiagnostic]
@@ -413,7 +413,7 @@ pub(crate) struct CallToFunctionWithRequiresUnsafe {
pub(crate) missing_target_features: DiagArgValue,
pub(crate) missing_target_features_count: usize,
#[note]
pub(crate) note: Option<()>,
pub(crate) note: bool,
pub(crate) build_target_features: DiagArgValue,
pub(crate) build_target_features_count: usize,
#[subdiagnostic]
@@ -431,7 +431,7 @@ pub(crate) struct CallToFunctionWithRequiresUnsafeUnsafeOpInUnsafeFnAllowed {
pub(crate) missing_target_features: DiagArgValue,
pub(crate) missing_target_features_count: usize,
#[note]
pub(crate) note: Option<()>,
pub(crate) note: bool,
pub(crate) build_target_features: DiagArgValue,
pub(crate) build_target_features_count: usize,
#[subdiagnostic]
@@ -623,7 +623,7 @@ pub(crate) struct LowerRangeBoundMustBeLessThanOrEqualToUpper {
#[label]
pub(crate) span: Span,
#[note(mir_build_teach_note)]
pub(crate) teach: Option<()>,
pub(crate) teach: bool,
}
#[derive(Diagnostic)]
@@ -865,7 +865,7 @@ pub(crate) struct PatternNotCovered<'s, 'tcx> {
#[subdiagnostic]
pub(crate) adt_defined_here: Option<AdtDefinedHere<'tcx>>,
#[note(mir_build_privately_uninhabited)]
pub(crate) witness_1_is_privately_uninhabited: Option<()>,
pub(crate) witness_1_is_privately_uninhabited: bool,
#[note(mir_build_pattern_ty)]
pub(crate) _p: (),
pub(crate) pattern_ty: Ty<'tcx>,