Skip to content

[WIP] Adopt lifetime annotations for owned resources. #1224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jul 14, 2025

This PR adopts the experimental @_lifetime attribute for resources owned by FileHandle and (on Windows) HMODULE so that we can use them without needing a with { }-style function call.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR adopts the experimental `@_lifetime` attribute for resources owned by
`FileHandle` and (on Windows) `HMODULE` so that we can use them without needing
a `with { }`-style function call.
@grynspan grynspan added this to the Swift 6.x (main) milestone Jul 14, 2025
@grynspan grynspan self-assigned this Jul 14, 2025
@grynspan grynspan added the enhancement New feature or request label Jul 14, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan closed this Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant