Annotate all of the `Unsafe*` types and `unsafe` functions in the standard
library (including concurrency, synchronization, etc.) as `@unsafe`. Add a
few tests to ensure that we detect uses of these types in clients that
have disabled unsafe code.
https://github.com/swiftlang/swift/pull/72612 can be reverted because it is no
longer necessary for the interface of the stdlib to be compatible with
compilers without `$TypedThrows` support.
Functions that are used in public `@inlinable` function bodies can't be marked
`@_spi` nor can they be made obsolete. Also, they must retain `rethrows` so
that use of these entry points from other `rethrows` functions is accepted.
Builds on https://github.com/apple/swift/pull/72365. Once we no longer have to
support pre-`$TypedThrows` compilers, all of this can be reverted.
Part of rdar://125138945
[stdlib] Pull back @_aeic on pointer → integer conversions
[stdlib] UnsafeMutablePointer.allocate: Fix thinko
[stdlib] Disable support for noncopyable pointees on some pointer operations
We have to temporarily pull back support for noncopyable pointees for UnsafeMutablePointer.initialize(to:), .moveInitialize, .moveUpdate, as the builtins they’re calling are no longer accepting such types.
These will return following a builtin audit.
[stdlib] Remove workarounds for certain builtins not supporting noncopyable use
https://github.com/apple/swift/pull/71733 fixed this!
[stdlib] Update FIXME
[stdlib] UnsafePointer: Update Swift version numbers
[stdlib] UnsafePointer: Actually hide legacy ABI
[stdlib] Remove workaround for U[M]BP.withMemoryRebound
The standard library's swiftinterface must temporarily remain buildable when
`$TypedThrows` evaluates to false since there are still supported Swift 5.11
compilers that did not have the feature enabled by default. Declarations using
typed throws in their signatures are guarded in printed swiftinterface files
with `#if $TypedThrows` and therefore `@inlinable` code that uses those
declarations must also be conditionalized on `$TypedThrows`.
- Overflow checks added for recent additions to pointer arithmetic (rounding and property pointers).
- The basic `advanced(by:)` functions will need to be dealt with separately.
- preserve previous version for ABI and source stability.
- add new version without alignment restriction.
- add explicit POD type enforcement in new version.