From: Matt Corallo Date: Thu, 28 Sep 2023 01:16:56 +0000 (+0000) Subject: Print fewer types in call generics, leaning on rustc to pick types X-Git-Tag: v0.0.117.0^2~10 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=9d79103585a215d97ba565744e0695dc8861f5f7;p=ldk-c-bindings Print fewer types in call generics, leaning on rustc to pick types Picking types is hard, its easier to make rustc do it. --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 9df1bd1..5f9e581 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -3070,7 +3070,9 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { // If this is a no-export'd crate and there's only one implementation in the // whole crate, just treat it as a reference to whatever the implementor is. if with_ref_lifetime { - write!(w, "&'static crate::{}", trait_impls[0]).unwrap(); + // Hope we're being printed in function generics and let rustc derive the + // type. + write!(w, "_").unwrap(); } else { write!(w, "&crate::{}", trait_impls[0]).unwrap(); }