Skip to content

Commit 73f0e93

Browse files
committed
Merge pull request #2745 from natecook1000/nc-doc-initreturns
[stdlib] Documentation consistency for OptionSet initializers
2 parents 06d8455 + 8e2ec66 commit 73f0e93

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

stdlib/public/core/OptionSet.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,10 @@ public protocol OptionSet : SetAlgebra, RawRepresentable {
115115
/// print(extraOptions.isStrictSuperset(of: .all))
116116
/// // Prints "true"
117117
///
118-
/// - Parameter rawValue: The raw value of the option set to create.
119-
/// - Returns: A new option set with the given raw value. Each bit of the raw
120-
/// value potentially represents an element of the option set, though raw
121-
/// values may include bits that are not defined as distinct values of the
122-
/// `OptionSet` type.
118+
/// - Parameter rawValue: The raw value of the option set to create. Each bit
119+
/// of `rawValue` potentially represents an element of the option set,
120+
/// though raw values may include bits that are not defined as distinct
121+
/// values of the `OptionSet` type.
123122
init(rawValue: RawValue)
124123
}
125124

@@ -319,8 +318,6 @@ extension OptionSet where RawValue : BitwiseOperations {
319318
/// Creates an empty option set.
320319
///
321320
/// This initializer creates an option set with a raw value of zero.
322-
///
323-
/// - Returns: An option set that contains no elements.
324321
public init() {
325322
self.init(rawValue: .allZeros)
326323
}

test/SourceKit/DocSupport/doc_clang_module.swift.response

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5580,7 +5580,7 @@ var FooSubUnnamedEnumeratorA1: Int { get }
55805580
key.name: "init()",
55815581
key.usr: "s:FesRxs9OptionSetwx8RawValues17BitwiseOperationsrS_cFT_x::SYNTHESIZED::c:@E@FooRuncingOptions",
55825582
key.original_usr: "s:FesRxs9OptionSetwx8RawValues17BitwiseOperationsrS_cFT_x",
5583-
key.doc.full_as_xml: "<Function><Name>init()</Name><USR>s:FesRxs9OptionSetwx8RawValues17BitwiseOperationsrS_cFT_x</USR><Declaration>convenience init()</Declaration><Abstract><Para>Creates an empty option set.</Para></Abstract><ResultDiscussion><Para>An option set that contains no elements.</Para></ResultDiscussion><Discussion><Para>This initializer creates an option set with a raw value of zero.</Para></Discussion></Function>",
5583+
key.doc.full_as_xml: "<Function><Name>init()</Name><USR>s:FesRxs9OptionSetwx8RawValues17BitwiseOperationsrS_cFT_x</USR><Declaration>convenience init()</Declaration><Abstract><Para>Creates an empty option set.</Para></Abstract><Discussion><Para>This initializer creates an option set with a raw value of zero.</Para></Discussion></Function>",
55845584
key.offset: 1933,
55855585
key.length: 18,
55865586
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>convenience</syntaxtype.keyword> <syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"

0 commit comments

Comments
 (0)