Skip to content

Conversation

stormshield-kg
Copy link
Contributor

Fixes #249.

The compilation errors were caused by the lifetimes when using closures with Future combinators in the RunQueryDsl trait.
This PR fixes the GAT errors by redefining custom Future combinators to limit closure usage.

@stormshield-kg stormshield-kg force-pushed the fix-hrtb-errors branch 2 times, most recently from 45b9877 to 80233b7 Compare September 23, 2025 10:55
@weiznich
Copy link
Owner

Thanks for opening this PR. This is really great work. I spend some time to looking at this today as I'm not 100% happy to have these manual future implementations there. So far I've not been able to remove them, so maybe that's really the best possible solution.

This commit replaces the hand written future impls with such ones that
wrap the types from futures-util. This hopefully reduces the complexity
and also allows using the well tested types instead of hand written
ones.

I also removed the dependency on pin-project-light in favour of two
lines of unsafe code as pin-project would do the same thing internally
as well and these two instances are trivial to reason about.
@weiznich weiznich merged commit 3569190 into weiznich:main Oct 2, 2025
24 checks passed
@weiznich
Copy link
Owner

weiznich commented Oct 2, 2025

Thanks again for figuring this out ❤️

I did some refactoring to use the future combinators from futures-utils instead of the hand written ones. I'm still a bit surprised that this works but using a plain type def fails for whatever reason with a impl not general enough error. Seems like another rustc limitation for me. Maybe I should open a bug about that someday…

@stormshield-kg stormshield-kg deleted the fix-hrtb-errors branch October 2, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation error when using pipelining
2 participants