From a1e8a8f0dbc0645a9cb017b31b778c3a61f91fe5 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Tue, 12 Nov 2019 15:17:36 +0100 Subject: [PATCH] fix(runtime-core) Same bug with `field-offset` as before. It will be fixed in a following PR. --- lib/runtime-core/src/vm.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/runtime-core/src/vm.rs b/lib/runtime-core/src/vm.rs index 7dfb7de2ba2..94d89df2e92 100644 --- a/lib/runtime-core/src/vm.rs +++ b/lib/runtime-core/src/vm.rs @@ -838,15 +838,9 @@ mod vm_offset_tests { #[test] fn imported_func() { - assert_eq!( - ImportedFunc::offset_func() as usize, - offset_of!(ImportedFunc => func).get_byte_offset(), - ); + assert_eq!(ImportedFunc::offset_func() as usize, 0); - assert_eq!( - ImportedFunc::offset_func_ctx() as usize, - offset_of!(ImportedFunc => func_ctx).get_byte_offset(), - ); + assert_eq!(ImportedFunc::offset_func_ctx() as usize, 8); } #[test]