[docs] stdlib guide - fix legacy naming

_sanityCheck is now called _internalInvariant
This commit is contained in:
Bradley Mackey
2020-06-18 14:36:28 +01:00
committed by GitHub
parent 0b7fea6036
commit 96a0962c9c

View File

@@ -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