From 12ed674f614af6ee5bb939f60f7b993e55cefc7c Mon Sep 17 00:00:00 2001 From: Folkert Date: Wed, 4 May 2022 23:47:01 +0200 Subject: [PATCH] turn test into const assert --- ast/src/lang/core/types.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ast/src/lang/core/types.rs b/ast/src/lang/core/types.rs index b8607f3e22..feb19f03a9 100644 --- a/ast/src/lang/core/types.rs +++ b/ast/src/lang/core/types.rs @@ -19,6 +19,8 @@ use crate::mem_pool::shallow_clone::ShallowClone; pub type TypeId = NodeId; +const TYPE2_SIZE: () = assert!(std::mem::size_of::() == 3 * 8 + 4); + #[derive(Debug)] pub enum Type2 { Variable(Variable), // 4B @@ -47,11 +49,6 @@ pub enum Type2 { Erroneous(Problem2), // 24B } -#[test] -fn type2_size() { - assert_eq!(std::mem::size_of::(), 28); // 24B + pad -} - #[derive(Debug)] pub enum Problem2 { CanonicalizationProblem,