about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <eddyb@lyken.rs>2022-01-24 15:14:40 +0000
committerEduard-Mihai Burtescu <eddyb@lyken.rs>2022-01-24 15:14:40 +0000
commitf5a32711dc14ea66510bd5c8a21763183ee5fc99 (patch)
tree787439a4ffcc83243d3e4ab26eb3de912c991e08 /compiler/rustc_errors/src
parenta8dfa3757cddd958c7dcadeeafd62721c45a487e (diff)
downloadrust-f5a32711dc14ea66510bd5c8a21763183ee5fc99.tar.gz
rust-f5a32711dc14ea66510bd5c8a21763183ee5fc99.zip
rustc_errors: add a new assert for the size of `PResult<()>`.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 180e1aca693..7582f317b85 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -56,6 +56,8 @@ 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 `DiagnosticBuilder`'s `diagnostic` field.)
 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+rustc_data_structures::static_assert_size!(PResult<'_, ()>, 16);
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
 rustc_data_structures::static_assert_size!(PResult<'_, bool>, 24);
 
 #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Encodable, Decodable)]