Skip to content

Conversation

@hnrklssn
Copy link
Member

Although the type is unsafe, the count is marked @safe, and this use of unsafe results in a warning (regardless of whether strict memory safety is enabled or not).
Keep emitting unsafe when the pointer buffer is wrapped in Optional for now however, because that is currently flagged as unsafe.

rdar://162416566

Although the type is unsafe, the count is marked `@safe`, and this use
of `unsafe` results in a warning (regardless of whether strict memory
safety is enabled or not).
Keep emitting `unsafe` when the pointer buffer is wrapped in Optional
for now however, because that is currently flagged as unsafe.

rdar://162416566
@hnrklssn
Copy link
Member Author

@swift-ci please smoke test

@hnrklssn
Copy link
Member Author

I don't know why these tests weren't failing, but I did see this warning when testing other stuff, and when I accidentally removed unsafe from the nullable cases they failed, so I'm still pretty confident this is correct.

@hnrklssn hnrklssn merged commit 5060e8f into swiftlang:main Oct 13, 2025
3 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