about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
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_middle/src
parent4d5b3b196284aded6ae99d12bcf149ffdc8ef379 (diff)
downloadrust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.tar.gz
rust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.zip
Use bool in favor of Option<()> for diagnostics
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/error.rs2
-rw-r--r--compiler/rustc_middle/src/ty/instance.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/error.rs b/compiler/rustc_middle/src/error.rs
index 61348cdce23..5c2aa0005d4 100644
--- a/compiler/rustc_middle/src/error.rs
+++ b/compiler/rustc_middle/src/error.rs
@@ -160,7 +160,7 @@ pub struct TypeLengthLimit {
     pub span: Span,
     pub shrunk: String,
     #[note(middle_written_to_path)]
-    pub was_written: Option<()>,
+    pub was_written: bool,
     pub path: PathBuf,
     pub type_length: usize,
 }
diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs
index 6f19739de45..ecb3943e788 100644
--- a/compiler/rustc_middle/src/ty/instance.rs
+++ b/compiler/rustc_middle/src/ty/instance.rs
@@ -581,9 +581,9 @@ impl<'tcx> Instance<'tcx> {
                     let mut path = PathBuf::new();
                     let was_written = if let Some(path2) = written_to_path {
                         path = path2;
-                        Some(())
+                        true
                     } else {
-                        None
+                        false
                     };
                     tcx.dcx().emit_fatal(error::TypeLengthLimit {
                         // We don't use `def_span(def_id)` so that diagnostics point