Skip to content

Make ContiguousBytes refine ~Copyable & ~Escapable and add Span family conformances#1803

Merged
jmschonfeld merged 1 commit intoswiftlang:mainfrom
jmschonfeld:contiguousbytes-generalization-refinement
Mar 10, 2026
Merged

Make ContiguousBytes refine ~Copyable & ~Escapable and add Span family conformances#1803
jmschonfeld merged 1 commit intoswiftlang:mainfrom
jmschonfeld:contiguousbytes-generalization-refinement

Conversation

@jmschonfeld
Copy link
Copy Markdown
Contributor

Now that downstream issues have been resolved, this updates ContiguousBytes to refine ~Copyable and ~Escapable and adds conformances for the span family of types

Motivation:

This implements some of the API changes proposed in SF-0034 to allow ContiguousBytes-based APIs to accept spans by adding ~Copyable and ~Escapable refinements to those APIs.

Modifications:

  • Add ~Copyable and ~Escapable refinements to ContiguousBytes
  • Add conformances for the span family of types to ContiguousBytes

Result:

Spans conform to ContiguousBytes and can be passed to APIs that accept a ContiguousBytes & ~Escapable & ~Copyable

Testing:

Covered by existing unit tests of ContiguousBytes

@jmschonfeld jmschonfeld requested a review from a team as a code owner March 9, 2026 21:05
@jmschonfeld
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@jmschonfeld jmschonfeld merged commit a03feee into swiftlang:main Mar 10, 2026
22 checks passed
@jmschonfeld jmschonfeld deleted the contiguousbytes-generalization-refinement branch March 10, 2026 17:28
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