Skip to content

Commit 96a0962

Browse files
[docs] stdlib guide - fix legacy naming
_sanityCheck is now called _internalInvariant
1 parent 0b7fea6 commit 96a0962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/StandardLibraryProgrammersManual.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ On these platforms, the Swift Standard Library ships as an integrated part of th
9898

9999
#### Unwrapping Optionals
100100

101-
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.
101+
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.
102102

103103
#### UnsafeBitCast and Casting References
104104

0 commit comments

Comments
 (0)