Skip to content

Commit 9d79103

Browse files
committed
Print fewer types in call generics, leaning on rustc to pick types
Picking types is hard, its easier to make rustc do it.
1 parent 3398c19 commit 9d79103

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

c-bindings-gen/src/types.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3070,7 +3070,9 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
30703070
// If this is a no-export'd crate and there's only one implementation in the
30713071
// whole crate, just treat it as a reference to whatever the implementor is.
30723072
if with_ref_lifetime {
3073-
write!(w, "&'static crate::{}", trait_impls[0]).unwrap();
3073+
// Hope we're being printed in function generics and let rustc derive the
3074+
// type.
3075+
write!(w, "_").unwrap();
30743076
} else {
30753077
write!(w, "&crate::{}", trait_impls[0]).unwrap();
30763078
}

0 commit comments

Comments
 (0)