about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/check_unsafety.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-08-21 00:57:58 -0400
committerMichael Goulet <michael@errs.io>2024-08-21 01:31:11 -0400
commit25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55 (patch)
tree7c081b337e865ac7a20217d90e29a14ce63dcef0 /compiler/rustc_mir_build/src/check_unsafety.rs
parent4d5b3b196284aded6ae99d12bcf149ffdc8ef379 (diff)
downloadrust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.tar.gz
rust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.zip
Use bool in favor of Option<()> for diagnostics
Diffstat (limited to 'compiler/rustc_mir_build/src/check_unsafety.rs')
-rw-r--r--compiler/rustc_mir_build/src/check_unsafety.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_build/src/check_unsafety.rs b/compiler/rustc_mir_build/src/check_unsafety.rs
index e4e5844d2ef..b6cf7a40ecd 100644
--- a/compiler/rustc_mir_build/src/check_unsafety.rs
+++ b/compiler/rustc_mir_build/src/check_unsafety.rs
@@ -793,7 +793,7 @@ impl UnsafeOpKind {
                         missing.iter().map(|feature| Cow::from(feature.to_string())).collect(),
                     ),
                     missing_target_features_count: missing.len(),
-                    note: if build_enabled.is_empty() { None } else { Some(()) },
+                    note: !build_enabled.is_empty(),
                     build_target_features: DiagArgValue::StrListSepByAnd(
                         build_enabled
                             .iter()
@@ -958,7 +958,7 @@ impl UnsafeOpKind {
                         missing.iter().map(|feature| Cow::from(feature.to_string())).collect(),
                     ),
                     missing_target_features_count: missing.len(),
-                    note: if build_enabled.is_empty() { None } else { Some(()) },
+                    note: !build_enabled.is_empty(),
                     build_target_features: DiagArgValue::StrListSepByAnd(
                         build_enabled
                             .iter()
@@ -977,7 +977,7 @@ impl UnsafeOpKind {
                         missing.iter().map(|feature| Cow::from(feature.to_string())).collect(),
                     ),
                     missing_target_features_count: missing.len(),
-                    note: if build_enabled.is_empty() { None } else { Some(()) },
+                    note: !build_enabled.is_empty(),
                     build_target_features: DiagArgValue::StrListSepByAnd(
                         build_enabled
                             .iter()