Yep. You want to add an entry to the list at http://mxr.mozilla.org/servo/source/components/script/dom/bindings/trace.rs#308 (and be sure to add a corresponding `use` statement at the top of the file).

Cheers,
Josh

On 2015-10-25 7:42 PM, Jitendra Jain wrote:
Hello,

We are trying to add the override_mime_type field to the XHR structure but
facing the following error since mime::Mime does not implement the
JSTraceable trait:


/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs:124:5:
124:49 error: no method named `trace` found for type
`dom::bindings::cell::DOMRefCell<core::option::Option<mime::Mime>>` in the
current scope
/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs:124
   override_mime_type: DOMRefCell<Option<Mime>>,

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs:108:1:
108:14 note: in this expansion of #[derive_JSTraceable] (defined in
/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs)
/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs:124:5:
124:49 note: the method `trace` exists but the following trait bounds were
not satisfied: `core::option::Option<mime::Mime> :
dom::bindings::trace::JSTraceable`
/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs:124:5:
124:49 help: items from traits can only be used if the trait is implemented
and in scope; the following trait defines an item `trace`, perhaps you need
to implement it:
/home/jitendra/Mozilla/servo/components/script/dom/xmlhttprequest.rs:124:5:
124:49 help: candidate #1: `dom::bindings::trace::JSTraceable`
error: aborting due to previous error
Could not compile `script`.


Anybody has any idea how can we get around this problem ?


_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to