Mark JSTraceable and its method as unsafe

This commit is contained in:
Anthony Ramine 2016-12-01 02:50:06 +01:00
parent 73b6e705b4
commit 620a67ff14
16 changed files with 191 additions and 185 deletions

View file

@ -41,10 +41,11 @@ fn expand_string(input: &str) -> String {
}
let tokens = quote! {
impl #impl_generics ::dom::bindings::trace::JSTraceable for #name #ty_generics #where_clause {
#[allow(unsafe_code)]
unsafe impl #impl_generics ::dom::bindings::trace::JSTraceable for #name #ty_generics #where_clause {
#[inline]
#[allow(unused_variables, unused_imports)]
fn trace(&self, tracer: *mut ::js::jsapi::JSTracer) {
unsafe fn trace(&self, tracer: *mut ::js::jsapi::JSTracer) {
use ::dom::bindings::trace::JSTraceable;
match *self {
#match_body