From 2eaf9fe364b9d3ce19addba2201fa4a84492c085 Mon Sep 17 00:00:00 2001 From: jackh726 Date: Sat, 14 Aug 2021 20:25:38 -0400 Subject: [PATCH] Static assert size of GenericBoun to ensure size doesn't change --- compiler/rustc_hir/src/hir.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 21fe894c6fc..4821b81153a 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -445,6 +445,9 @@ pub enum GenericBound<'hir> { Outlives(Lifetime), } +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] +rustc_data_structures::static_assert_size!(GenericBound<'_>, 48); + impl GenericBound<'_> { pub fn trait_ref(&self) -> Option<&TraitRef<'_>> { match self {