From 0eae038578f2b261fb2144a8c2d1a9e4200d0b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 2 Nov 2020 14:02:33 +0200 Subject: [PATCH] glib-macros: Use absolute paths to the StaticType trait Otherwise code using it derive macros needs to have it in scope already, which is not very user-friendly. --- glib-macros/src/genum_derive.rs | 2 +- glib-macros/src/gflags_attribute.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glib-macros/src/genum_derive.rs b/glib-macros/src/genum_derive.rs index 4fb28c157539..d8bcc1167773 100644 --- a/glib-macros/src/genum_derive.rs +++ b/glib-macros/src/genum_derive.rs @@ -143,7 +143,7 @@ pub fn impl_genum(input: &syn::DeriveInput) -> TokenStream { } } - impl StaticType for #name { + impl #crate_ident::StaticType for #name { fn static_type() -> #crate_ident::Type { #get_type() } diff --git a/glib-macros/src/gflags_attribute.rs b/glib-macros/src/gflags_attribute.rs index d2fae9e7ed73..b86ac785d731 100644 --- a/glib-macros/src/gflags_attribute.rs +++ b/glib-macros/src/gflags_attribute.rs @@ -157,7 +157,7 @@ pub fn impl_gflags(input: &DeriveInput, gtype_name: &LitStr) -> TokenStream { } } - impl StaticType for #name { + impl #crate_ident::StaticType for #name { fn static_type() -> #crate_ident::Type { #get_type() }