Use 2018-style paths in code generated by proc-macro derives

This commit is contained in:
Simon Sapin 2018-11-01 23:43:08 +01:00
parent acabd50f03
commit 86f148fb97
3 changed files with 13 additions and 13 deletions

View file

@ -21,16 +21,16 @@ fn js_traceable_derive(s: synstructure::Structure) -> quote::Tokens {
let ident = param.ident;
where_clause
.predicates
.push(parse_quote!(#ident: ::dom::bindings::trace::JSTraceable))
.push(parse_quote!(#ident: crate::dom::bindings::trace::JSTraceable))
}
let tokens = quote! {
#[allow(unsafe_code)]
unsafe impl #impl_generics ::dom::bindings::trace::JSTraceable for #name #ty_generics #where_clause {
unsafe impl #impl_generics crate::dom::bindings::trace::JSTraceable for #name #ty_generics #where_clause {
#[inline]
#[allow(unused_variables, unused_imports)]
unsafe fn trace(&self, tracer: *mut ::js::jsapi::JSTracer) {
use ::dom::bindings::trace::JSTraceable;
unsafe fn trace(&self, tracer: *mut js::jsapi::JSTracer) {
use crate::dom::bindings::trace::JSTraceable;
match *self {
#match_body
}