Skip to content

Commit 5636e57

Browse files
authored
wasmparser: Enable the extended constant expressions proposal by default (#1524)
It is phase 4, so let's enable it by default.
1 parent 755abb6 commit 5636e57

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

crates/wasmparser/src/validator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ define_wasm_features! {
341341
/// The WebAssembly memory64 proposal.
342342
pub memory64: MEMORY64(1 << 14) = false;
343343
/// The WebAssembly extended_const proposal.
344-
pub extended_const: EXTENDED_CONST(1 << 15) = false;
344+
pub extended_const: EXTENDED_CONST(1 << 15) = true;
345345
/// The WebAssembly component model proposal.
346346
pub component_model: COMPONENT_MODEL(1 << 16) = true;
347347
/// The WebAssembly typed function references proposal.

tests/roundtrip.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ fn error_matches(error: &str, message: &str) -> bool {
651651
|| message == "malformed annotation id"
652652
|| message == "alignment must be a power of two"
653653
|| message == "i32 constant out of range"
654+
|| message == "constant expression required"
654655
{
655656
return error.contains("expected ")
656657
|| error.contains("constant out of range")

0 commit comments

Comments
 (0)