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-Tag: v0.0.13~37^2~9 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ef2b321fdb577245b662b575232d4c40f14ad7b2;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 7ecd9ef1e..628d263bf 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -1061,7 +1061,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);