]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_errors/lib.rs
Tiny cleanup to size assertions
[rust.git] / src / librustc_errors / lib.rs
index 67c180a05e9211bb7ed231f13393a5e90fb86a15..8ee28875c625931bd277ad2cb8814aa854cc686d 100644 (file)
@@ -15,7 +15,6 @@
 
 use emitter::{Emitter, EmitterWriter, is_case_difference};
 use registry::Registry;
-
 use rustc_data_structures::sync::{self, Lrc, Lock};
 use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
 use rustc_data_structures::stable_hasher::StableHasher;
     SpanSnippetError,
 };
 
+pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>;
+
+// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
+// (See also the comment on `DiagnosticBuilderInner`.)
+#[cfg(target_arch = "x86_64")]
+rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
+
 /// Indicates the confidence in the correctness of a suggestion.
 ///
 /// All suggestions are marked with an `Applicability`. Tools use the applicability of a suggestion