Skip to content

Update lifetime dependence syntax and inference#72506

Merged
meg-gupta merged 2 commits into
swiftlang:mainfrom
meg-gupta:changesyntax
Mar 24, 2024
Merged

Update lifetime dependence syntax and inference#72506
meg-gupta merged 2 commits into
swiftlang:mainfrom
meg-gupta:changesyntax

Conversation

@meg-gupta

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

Copy link
Copy Markdown
Contributor

Pitch - swiftlang/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
Copy Markdown
Contributor Author

@swift-ci test

@meg-gupta
meg-gupta requested a review from atrick March 22, 2024 07:29
@meg-gupta
meg-gupta marked this pull request as ready for review March 22, 2024 16:23
@meg-gupta

Copy link
Copy Markdown
Contributor Author

@swift-ci test windows

@meg-gupta

Copy link
Copy Markdown
Contributor Author

Swift-syntax work is pending

@atrick atrick left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/Sema/LifetimeDependence.cpp Outdated
Comment thread test/Parse/explicit_lifetime_dependence_specifiers.swift Outdated
@meg-gupta

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@meg-gupta
meg-gupta enabled auto-merge March 23, 2024 05:20
… pitch

Pitch - swiftlang/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
Copy Markdown
Contributor Author

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

@swift-ci Please test

@meg-gupta

Copy link
Copy Markdown
Contributor Author

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

@swift-ci Please test macOS platform

1 similar comment
@meg-gupta

Copy link
Copy Markdown
Contributor Author

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

@swift-ci Please test macOS platform

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