Skip to content

Commit f5a3271

Browse files
committed
rustc_errors: add a new assert for the size of PResult<()>.
1 parent a8dfa37 commit f5a3271

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_errors/src

1 file changed

+2
-0
lines changed

compiler/rustc_errors/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>;
5656
// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
5757
// (See also the comment on `DiagnosticBuilder`'s `diagnostic` field.)
5858
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
59+
rustc_data_structures::static_assert_size!(PResult<'_, ()>, 16);
60+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
5961
rustc_data_structures::static_assert_size!(PResult<'_, bool>, 24);
6062

6163
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Encodable, Decodable)]

0 commit comments

Comments
 (0)