From: Matt Corallo Date: Thu, 31 Dec 2020 00:46:39 +0000 (-0500) Subject: [bindings] Allow `write_rust_type` to handle leading-colon paths X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4fe9aea4b8a07a5a95ebeca448c66ef8b9cc5c94;p=rust-lightning [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. --- 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);