Skip to content

Commit 8c3346e

Browse files
authored
Fix build of wast with randomized layouts (#1751)
Move the static assertion about size to a runtime test to enable building with randomized layouts for testing.
1 parent cd886fe commit 8c3346e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/wast/src/lexer.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ pub struct Token {
6161
pub len: u32,
6262
}
6363

64-
const _: () = {
64+
#[test]
65+
fn token_is_not_too_big() {
6566
assert!(std::mem::size_of::<Token>() <= std::mem::size_of::<u64>() * 2);
66-
};
67+
}
6768

6869
/// Classification of what was parsed from the input stream.
6970
///

0 commit comments

Comments
 (0)