]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Allow liftime bounds on generic bounds
authorMatt Corallo <git@bluematt.me>
Mon, 19 Sep 2022 12:51:02 +0000 (12:51 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 23 Sep 2022 19:04:25 +0000 (19:04 +0000)
While liftime bounds require bindings users to ensure liftime
requirements are met, they're important for allowing us to export
lock wrappers. Thus, we relax the simple-bounds assertions checks
here.

c-bindings-gen/src/types.rs

index c35b7aecf14034830d3b7eede68f05d3d5034dc5..5fd874d3308ce04e362729d97dd13729115459e4 100644 (file)
@@ -147,7 +147,7 @@ pub fn export_status(attrs: &[syn::Attribute]) -> ExportStatus {
 }
 
 pub fn assert_simple_bound(bound: &syn::TraitBound) {
-       if bound.paren_token.is_some() || bound.lifetimes.is_some() { unimplemented!(); }
+       if bound.paren_token.is_some() { unimplemented!(); }
        if let syn::TraitBoundModifier::Maybe(_) = bound.modifier { unimplemented!(); }
 }