Skip to content

Conversation

@dicej
Copy link
Collaborator

@dicej dicej commented Jan 15, 2025

Prior to #1124, we were dropping borrows too late. That PR fixed that problem, but dropped borrows too early and didn't allow application code to capture the borrows in the Future it returned. This patch improves the situation by dropping borrows as late as possible, but no later. As a side effect, it simplfies the code and makes implementing the generated trait(s) much more ergonomic.

Prior to bytecodealliance#1124, we were dropping borrows too late.  That PR fixed that problem,
but dropped borrows too early and didn't allow application code to capture the
borrows in the `Future` it returned.  This patch improves the situation by
dropping borrows as late as possible, but no later.  As a side effect, it
simplfies the code and makes implementing the generated trait(s) much more
ergonomic.

Signed-off-by: Joel Dice <[email protected]>
@dicej dicej requested a review from alexcrichton January 15, 2025 15:16
@alexcrichton alexcrichton added this pull request to the merge queue Jan 15, 2025
Merged via the queue into bytecodealliance:main with commit 4f4a953 Jan 15, 2025
25 checks passed
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.

2 participants