]> 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 9743cf0d805a3eac513bc6568ad62c7997c0a996..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
@@ -1027,7 +1033,7 @@ pub fn is_failure_note(&self) -> bool {
 }
 
 #[macro_export]
-macro_rules! pluralise {
+macro_rules! pluralize {
     ($x:expr) => {
         if $x != 1 { "s" } else { "" }
     };