mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[docs] stdlib guide - fix legacy naming
_sanityCheck is now called _internalInvariant
This commit is contained in:
@@ -98,7 +98,7 @@ On these platforms, the Swift Standard Library ships as an integrated part of th
|
||||
|
||||
#### Unwrapping Optionals
|
||||
|
||||
Optionals can be unwrapped with `!`, which triggers a trap on nil. Alternatively, they can be `.unsafelyUnwrapped()`, which will check and trap in debug builds of user code. Internal to the standard library is `._unsafelyUnwrappedUnchecked()` which will only check and trap in debug builds of the standard library itself. These correspond directly with `_precondition`, `_debugPrecondition`, and `_sanityCheck`. See [that section](#precondition) for details.
|
||||
Optionals can be unwrapped with `!`, which triggers a trap on nil. Alternatively, they can be `.unsafelyUnwrapped()`, which will check and trap in debug builds of user code. Internal to the standard library is `._unsafelyUnwrappedUnchecked()` which will only check and trap in debug builds of the standard library itself. These correspond directly with `_precondition`, `_debugPrecondition`, and `_internalInvariant`. See [that section](#precondition) for details.
|
||||
|
||||
#### UnsafeBitCast and Casting References
|
||||
|
||||
|
||||
Reference in New Issue
Block a user