test(runtime-core) offset_of! fails with a struct containing NonNull types.

It fails only in release mode. That's a bug from the `field-offset`
crate. This patch is a temporary fix.
This commit is contained in:
Ivan Enderlin
2019-11-12 14:34:55 +01:00
parent 22abd8efdc
commit 0de7f4fd0b

View File

@ -831,15 +831,9 @@ mod vm_offset_tests {
#[test]
fn func_ctx() {
assert_eq!(
FuncCtx::offset_vmctx() as usize,
offset_of!(FuncCtx => vmctx).get_byte_offset(),
);
assert_eq!(FuncCtx::offset_vmctx() as usize, 0,);
assert_eq!(
FuncCtx::offset_func_env() as usize,
offset_of!(FuncCtx => func_env).get_byte_offset(),
);
assert_eq!(FuncCtx::offset_func_env() as usize, 8,);
}
#[test]