Skip to content

Commit 4dffe27

Browse files
authored
Merge pull request #59330 from glessard/rdar94296845-assertionFailure-docs
[docs] improvements for assertionFailure and preconditionFailure
2 parents 314fe2b + 6219ae9 commit 4dffe27

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

stdlib/public/core/Assert.swift

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ public func precondition(
100100

101101
/// Indicates that an internal sanity check failed.
102102
///
103-
/// Use this function to stop the program, without impacting the performance of
104-
/// shipping code, when control flow is not expected to reach the call---for
105-
/// example, in the `default` case of a `switch` where you have knowledge that
106-
/// one of the other cases must be satisfied. To protect code from invalid
107-
/// usage in Release builds, see `preconditionFailure(_:file:line:)`.
103+
/// This function's effect varies depending on the build flag used:
108104
///
109105
/// * In playgrounds and `-Onone` builds (the default for Xcode's Debug
110106
/// configuration), stop program execution in a debuggable state after
@@ -141,8 +137,11 @@ public func assertionFailure(
141137
/// Indicates that a precondition was violated.
142138
///
143139
/// Use this function to stop the program when control flow can only reach the
144-
/// call if your API was improperly used. This function's effects vary
145-
/// depending on the build flag used:
140+
/// call if your API was improperly used and execution flow is not expected to
141+
/// reach the call---for example, in the `default` case of a `switch` where
142+
/// you have knowledge that one of the other cases must be satisfied.
143+
///
144+
/// This function's effect varies depending on the build flag used:
146145
///
147146
/// * In playgrounds and `-Onone` builds (the default for Xcode's Debug
148147
/// configuration), stops program execution in a debuggable state after

0 commit comments

Comments
 (0)