Closed llacroix closed 9 years ago
@jdm doesn't seem like it. https://github.com/rust-lang/rust/issues/28229 exists with rustc 1.4.0-nightly (7780408af 2015-09-01) but rust-mozjs compiles ok.
@bjwbell I'll give a try with this version. It could be good to point out which rust version compile fine rust-mozjs.
The problem seems to happen on these definitions:
pub type ReadTransferStructuredCloneOp =
::std::option::Option<unsafe extern "C" fn
(cx: *mut JSContext,
r: *mut JSStructuredCloneReader, tag: u32,
content: *mut ::libc::c_void, extraData: u64,
closure: *mut ::libc::c_void,
returnObject: MutableHandleObject) -> u8>;
pub type TransferStructuredCloneOp =
::std::option::Option<unsafe extern "C" fn
(cx: *mut JSContext, obj: Handle<*mut JSObject>,
closure: *mut ::libc::c_void, tag: *mut u32,
ownership: *mut TransferableOwnership,
content: *mut *mut ::libc::c_void,
extraData: *mut u64) -> u8>;
pub type GetPropertyOp =
::std::option::Option<unsafe extern "C" fn
(cx: *mut JSContext, obj: HandleObject,
receiver: HandleObject, id: HandleId,
vp: MutableHandleValue) -> u8>;
pub type SetPropertyOp =
::std::option::Option<unsafe extern "C" fn
(cx: *mut JSContext, obj: HandleObject,
receiver: HandleObject, id: HandleId,
vp: MutableHandleValue,
result: *mut ObjectOpResult) -> u8>;
pub type OpenAsmJSCacheEntryForReadOp =
::std::option::Option<unsafe extern "C" fn
(global: HandleObject, begin: *const i16,
limit: *const i16, size: *mut u32,
memory: *mut *const u8, handle: *mut i32)
-> u8>;
pub type CloseAsmJSCacheEntryForReadOp =
::std::option::Option<unsafe extern "C" fn
(size: u32, memory: *const u8, handle: i32)>;
Those six entries are causing the same error while expending [#derive_Clone] I'm not sure how those object types are much different from the other ones... As all the object I see that are declared in the struct are also Option
.
I suspect it's the arguments that are raw pointers that are triggering this error, incorrectly.
This is a regression, https://github.com/rust-lang/rust/issues/28559
problem solved with this fix
I'm on nightly from 17/09/2015