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/?a=commitdiff_plain;h=f116ebbdf9d9c19cfb0e41c622d73cd750fccb44;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);