Skip to content
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

Update lifetime dependence syntax and inference #72506

Merged
merged 2 commits into from
Mar 24, 2024

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Mar 22, 2024

Pitch - apple/swift-evolution#2305

Changes highlights:

dependsOn(paramName) and dependsOn(scoped paramName) syntax

dependsOn(paramName) -> copy lifetime dependence for all parameters/self except when we have Escapable parameters/self, we assign scope lifetime dependence.

Allow lifetime dependence on parameters without ownership modifier.

Always infer copy lifetime dependence except when we have
Escapable parameters/self, we infer scope lifetime dependence.

Allow lifetime dependence inference on parameters without ownership modifier.

@meg-gupta meg-gupta force-pushed the changesyntax branch 2 times, most recently from 42632b4 to 22b68c7 Compare March 22, 2024 07:11
@meg-gupta meg-gupta changed the title Update lifetime dependence syntax Update lifetime dependence syntax and inference Mar 22, 2024
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci test windows

@meg-gupta
Copy link
Contributor Author

Swift-syntax work is pending

Copy link
Member

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is a lot of nice work in one day! I don't see anything that needs to be changed in this PR.

lib/Sema/LifetimeDependence.cpp Show resolved Hide resolved
test/Parse/explicit_lifetime_dependence_specifiers.swift Outdated Show resolved Hide resolved
@meg-gupta
Copy link
Contributor Author

@swift-ci test

… pitch

Pitch - apple/swift-evolution#2305

Changes highlights:

dependsOn(paramName) and dependsOn(scoped argName) syntax

dependsOn(paramName) -> copy lifetime dependence for all parameters/self except
                         when we have Escapable parameters/self, we assign scope
                         lifetime dependence.

Allow lifetime dependence on parameters without ownership modifier.

Always infer copy lifetime dependence except when we have
Escapable parameters/self, we infer scope lifetime dependence.

Allow lifetime dependence inference on parameters without ownership modifier.
@meg-gupta
Copy link
Contributor Author

Please test with following pull request:
apple/swift-syntax#2564

@swift-ci Please test

@meg-gupta
Copy link
Contributor Author

Please test with following pull request:
apple/swift-syntax#2564

@swift-ci Please test macOS platform

1 similar comment
@meg-gupta
Copy link
Contributor Author

Please test with following pull request:
apple/swift-syntax#2564

@swift-ci Please test macOS platform

@meg-gupta meg-gupta merged commit 0c2425f into apple:main Mar 24, 2024
4 of 5 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.

None yet

2 participants