From 4fe9aea4b8a07a5a95ebeca448c66ef8b9cc5c94 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 30 Dec 2020 19:46:39 -0500 Subject: [PATCH] [bindings] Allow `write_rust_type` to handle leading-colon paths It just stubs out to `write_rust_path` in this case anyway, which handles leading-colons just fine, so no need to panic on them. --- c-bindings-gen/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index eacae9034..d6a2c989e 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -1053,7 +1053,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { pub fn write_rust_type(&self, w: &mut W, generics: Option<&GenericTypes>, t: &syn::Type) { match t { syn::Type::Path(p) => { - if p.qself.is_some() || p.path.leading_colon.is_some() { + if p.qself.is_some() { unimplemented!(); } self.write_rust_path(w, generics, &p.path); -- 2.39.5