Skip to content

Commit b7af9bf

Browse files
committed
[stdlib] Remove SeeAlso tags
1 parent 0a7780c commit b7af9bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2
-318
lines changed

stdlib/public/core/Arrays.swift.gyb

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ if True:
169169
/// specific values.
170170
"""
171171
elif Self == 'Array':
172-
SelfDocComment = '''\
172+
SelfDocComment = """\
173173
/// An ordered, random-access collection.
174174
///
175175
/// Arrays are one of the most commonly used data types in an app. You use
@@ -447,9 +447,7 @@ if True:
447447
///
448448
/// - Note: The `ContiguousArray` and `ArraySlice` types are not bridged;
449449
/// instances of those types always have a contiguous block of memory as
450-
/// their storage.
451-
/// - SeeAlso: `ContiguousArray`, `ArraySlice`, `Sequence`, `Collection`,
452-
/// `RangeReplaceableCollection`'''
450+
/// their storage."""
453451
# FIXME: Write about Array up/down-casting.
454452
else:
455453
raise ValueError('Unhandled case: ' + Self)
@@ -620,8 +618,6 @@ public struct ${Self}<Element>
620618
/// - Returns: An index offset by `n` from the index `i`, unless that index
621619
/// would be beyond `limit` in the direction of movement. In that case,
622620
/// the method returns `nil`.
623-
///
624-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
625621
@_inlineable
626622
public func index(
627623
_ i: Int, offsetBy n: Int, limitedBy limit: Int
@@ -736,10 +732,6 @@ public struct ${Self}<Element>
736732
///
737733
/// - Parameter bounds: A range of integers. The bounds of the range must be
738734
/// valid indices of the array.
739-
%if Self != 'ArraySlice':
740-
///
741-
/// - SeeAlso: `ArraySlice`
742-
%end
743735
@_inlineable
744736
public subscript(bounds: Range<Int>) -> ArraySlice<Element> {
745737
get {
@@ -1687,8 +1679,6 @@ extension ${Self} {
16871679
/// `withUnsafeBufferPointer(_:)` method. The pointer argument is valid
16881680
/// only for the duration of the method's execution.
16891681
/// - Returns: The return value of the `body` closure parameter, if any.
1690-
///
1691-
/// - SeeAlso: `withUnsafeMutableBufferPointer`, `UnsafeBufferPointer`
16921682
@_inlineable
16931683
public func withUnsafeBufferPointer<R>(
16941684
_ body: (UnsafeBufferPointer<Element>) throws -> R
@@ -1732,8 +1722,6 @@ extension ${Self} {
17321722
/// pointer argument is valid only for the duration of the method's
17331723
/// execution.
17341724
/// - Returns: The return value of the `body` closure parameter, if any.
1735-
///
1736-
/// - SeeAlso: `withUnsafeBufferPointer`, `UnsafeMutableBufferPointer`
17371725
@_semantics("array.withUnsafeMutableBufferPointer")
17381726
@inline(__always) // Performance: This method should get inlined into the
17391727
// caller such that we can combine the partial apply with the apply in this
@@ -2264,8 +2252,6 @@ extension ${Self} {
22642252
/// return value for the `withUnsafeMutableBytes(_:)` method. The argument
22652253
/// is valid only for the duration of the closure's execution.
22662254
/// - Returns: The return value of the `body` closure parameter, if any.
2267-
///
2268-
/// - SeeAlso: `withUnsafeBytes`, `UnsafeMutableRawBufferPointer`
22692255
@_inlineable
22702256
public mutating func withUnsafeMutableBytes<R>(
22712257
_ body: (UnsafeMutableRawBufferPointer) throws -> R
@@ -2300,8 +2286,6 @@ extension ${Self} {
23002286
/// return value for the `withUnsafeBytes(_:)` method. The argument is
23012287
/// valid only for the duration of the closure's execution.
23022288
/// - Returns: The return value of the `body` closure parameter, if any.
2303-
///
2304-
/// - SeeAlso: `withUnsafeMutableBytes`, `UnsafeRawBufferPointer`
23052289
@_inlineable
23062290
public func withUnsafeBytes<R>(
23072291
_ body: (UnsafeRawBufferPointer) throws -> R
@@ -2360,7 +2344,6 @@ extension Array {
23602344
///
23612345
/// - Complexity: O(*n*) if the array is bridged, where *n* is the length
23622346
/// of the array; otherwise, O(1).
2363-
/// - SeeAlso: `removeLast()`
23642347
@_inlineable
23652348
public mutating func popLast() -> Element? {
23662349
guard !isEmpty else { return nil }
@@ -2375,7 +2358,6 @@ extension ContiguousArray {
23752358
/// otherwise, `nil`.
23762359
///
23772360
/// - Complexity: O(1)
2378-
/// - SeeAlso: `removeLast()`
23792361
@_inlineable
23802362
public mutating func popLast() -> Element? {
23812363
guard !isEmpty else { return nil }

stdlib/public/core/BidirectionalCollection.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ extension BidirectionalCollection where SubSequence == Self {
232232
/// or more elements; otherwise, `nil`.
233233
///
234234
/// - Complexity: O(1).
235-
/// - SeeAlso: `removeLast()`
236235
public mutating func popLast() -> Element? {
237236
guard !isEmpty else { return nil }
238237
let element = last!
@@ -248,7 +247,6 @@ extension BidirectionalCollection where SubSequence == Self {
248247
/// - Returns: The last element of the collection.
249248
///
250249
/// - Complexity: O(1)
251-
/// - SeeAlso: `popLast()`
252250
@discardableResult
253251
public mutating func removeLast() -> Element {
254252
let element = last!

stdlib/public/core/Bool.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ extension Bool : Equatable, Hashable {
145145
/// - Note: The hash value is not guaranteed to be stable across different
146146
/// invocations of the same program. Do not persist the hash value across
147147
/// program runs.
148-
/// - SeeAlso: `Hashable`
149148
@_transparent
150149
public var hashValue: Int {
151150
return self ? 1 : 0

stdlib/public/core/CString.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ extension String {
143143
/// - Returns: A tuple with the new string and a Boolean value that indicates
144144
/// whether any repairs were made. If `isRepairing` is `false` and an
145145
/// ill-formed sequence is detected, this method returns `nil`.
146-
///
147-
/// - SeeAlso: `UnicodeCodec`
148146
public static func decodeCString<Encoding : _UnicodeEncoding>(
149147
_ cString: UnsafePointer<Encoding.CodeUnit>?,
150148
as encoding: Encoding.Type,

stdlib/public/core/ClosedRange.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ public struct ClosedRangeIterator<Bound> : IteratorProtocol, Sequence
174174
/// bound by floating-point values, see the `ClosedRange` type. If you need to
175175
/// iterate over consecutive floating-point values, see the
176176
/// `stride(from:through:by:)` function.
177-
///
178-
/// - SeeAlso: `CountableRange`, `ClosedRange`, `Range`
179177
@_fixed_layout
180178
public struct CountableClosedRange<Bound> : RandomAccessCollection
181179
where
@@ -373,8 +371,6 @@ public struct CountableClosedRange<Bound> : RandomAccessCollection
373371
/// let lowercaseA = "a"..."a"
374372
/// print(lowercaseA.isEmpty)
375373
/// // Prints "false"
376-
///
377-
/// - SeeAlso: `CountableRange`, `Range`, `CountableClosedRange`
378374
@_fixed_layout
379375
public struct ClosedRange<
380376
Bound : Comparable

stdlib/public/core/Collection.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public protocol _IndexableBase {
3232
/// Valid indices consist of the position of every element and a
3333
/// "past the end" position that's not valid for use as a subscript
3434
/// argument.
35-
///
36-
/// - SeeAlso: endIndex
3735
associatedtype Index : Comparable
3836

3937
/// The position of the first element in a nonempty collection.
@@ -153,8 +151,6 @@ public protocol _IndexableBase {
153151
///
154152
/// - Parameter i: A valid index of the collection. `i` must be less than
155153
/// `endIndex`.
156-
///
157-
/// - SeeAlso: `index(after:)`
158154
func formIndex(after i: inout Index)
159155
}
160156

@@ -195,7 +191,6 @@ public protocol _Indexable : _IndexableBase {
195191
/// If `n` is negative, this is the same value as the result of `-n` calls
196192
/// to `index(before:)`.
197193
///
198-
/// - SeeAlso: `index(_:offsetBy:limitedBy:)`, `formIndex(_:offsetBy:)`
199194
/// - Complexity: O(1) if the collection conforms to
200195
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
201196
/// value of `n`.
@@ -238,7 +233,6 @@ public protocol _Indexable : _IndexableBase {
238233
/// would be beyond `limit` in the direction of movement. In that case,
239234
/// the method returns `nil`.
240235
///
241-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
242236
/// - Complexity: O(1) if the collection conforms to
243237
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
244238
/// value of `n`.
@@ -256,7 +250,6 @@ public protocol _Indexable : _IndexableBase {
256250
/// - n: The distance to offset `i`. `n` must not be negative unless the
257251
/// collection conforms to the `BidirectionalCollection` protocol.
258252
///
259-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
260253
/// - Complexity: O(1) if the collection conforms to
261254
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
262255
/// value of `n`.
@@ -280,7 +273,6 @@ public protocol _Indexable : _IndexableBase {
280273
/// going beyond `limit`; otherwise, `false`. When the return value is
281274
/// `false`, the value of `i` is equal to `limit`.
282275
///
283-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
284276
/// - Complexity: O(1) if the collection conforms to
285277
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
286278
/// value of `n`.
@@ -793,7 +785,6 @@ public protocol Collection : _Indexable, Sequence
793785
/// - Returns: A subsequence up to, but not including, the `end` position.
794786
///
795787
/// - Complexity: O(1)
796-
/// - SeeAlso: `prefix(through:)`
797788
func prefix(upTo end: Index) -> SubSequence
798789

799790
/// Returns a subsequence from the specified position to the end of the
@@ -860,7 +851,6 @@ public protocol Collection : _Indexable, Sequence
860851
/// - Returns: A subsequence up to, and including, the `end` position.
861852
///
862853
/// - Complexity: O(1)
863-
/// - SeeAlso: `prefix(upTo:)`
864854
func prefix(through position: Index) -> SubSequence
865855

866856
/// A Boolean value indicating whether the collection is empty.
@@ -936,7 +926,6 @@ public protocol Collection : _Indexable, Sequence
936926
/// If `n` is negative, this is the same value as the result of `-n` calls
937927
/// to `index(before:)`.
938928
///
939-
/// - SeeAlso: `index(_:offsetBy:limitedBy:)`, `formIndex(_:offsetBy:)`
940929
/// - Complexity: O(1) if the collection conforms to
941930
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
942931
/// value of `n`.
@@ -979,7 +968,6 @@ public protocol Collection : _Indexable, Sequence
979968
/// would be beyond `limit` in the direction of movement. In that case,
980969
/// the method returns `nil`.
981970
///
982-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
983971
/// - Complexity: O(1) if the collection conforms to
984972
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
985973
/// value of `n`.
@@ -1078,7 +1066,6 @@ extension _Indexable {
10781066
/// If `n` is negative, this is the same value as the result of `-n` calls
10791067
/// to `index(before:)`.
10801068
///
1081-
/// - SeeAlso: `index(_:offsetBy:limitedBy:)`, `formIndex(_:offsetBy:)`
10821069
/// - Complexity: O(1) if the collection conforms to
10831070
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
10841071
/// value of `n`.
@@ -1124,7 +1111,6 @@ extension _Indexable {
11241111
/// would be beyond `limit` in the direction of movement. In that case,
11251112
/// the method returns `nil`.
11261113
///
1127-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
11281114
/// - Complexity: O(1) if the collection conforms to
11291115
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
11301116
/// value of `n`.
@@ -1145,7 +1131,6 @@ extension _Indexable {
11451131
/// - n: The distance to offset `i`. `n` must not be negative unless the
11461132
/// collection conforms to the `BidirectionalCollection` protocol.
11471133
///
1148-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
11491134
/// - Complexity: O(1) if the collection conforms to
11501135
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
11511136
/// value of `n`.
@@ -1172,7 +1157,6 @@ extension _Indexable {
11721157
/// going beyond `limit`; otherwise, `false`. When the return value is
11731158
/// `false`, the value of `i` is equal to `limit`.
11741159
///
1175-
/// - SeeAlso: `index(_:offsetBy:)`, `formIndex(_:offsetBy:limitedBy:)`
11761160
/// - Complexity: O(1) if the collection conforms to
11771161
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
11781162
/// value of `n`.
@@ -1644,7 +1628,6 @@ extension Collection {
16441628
/// - Returns: A subsequence up to, but not including, the `end` position.
16451629
///
16461630
/// - Complexity: O(1)
1647-
/// - SeeAlso: `prefix(through:)`
16481631
@_inlineable
16491632
public func prefix(upTo end: Index) -> SubSequence {
16501633
return self[startIndex..<end]
@@ -1717,7 +1700,6 @@ extension Collection {
17171700
/// - Returns: A subsequence up to, and including, the `end` position.
17181701
///
17191702
/// - Complexity: O(1)
1720-
/// - SeeAlso: `prefix(upTo:)`
17211703
@_inlineable
17221704
public func prefix(through position: Index) -> SubSequence {
17231705
return prefix(upTo: index(after: position))
@@ -1884,7 +1866,6 @@ extension Collection where SubSequence == Self {
18841866
/// - Returns: The first element of the collection.
18851867
///
18861868
/// - Complexity: O(1)
1887-
/// - SeeAlso: `popFirst()`
18881869
@_inlineable
18891870
@discardableResult
18901871
public mutating func removeFirst() -> Element {

stdlib/public/core/CollectionAlgorithms.swift.gyb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ extension Collection where Element : Equatable {
5353
/// - Parameter element: An element to search for in the collection.
5454
/// - Returns: The first index where `element` is found. If `element` is not
5555
/// found in the collection, returns `nil`.
56-
///
57-
/// - SeeAlso: `index(where:)`
5856
@_inlineable
5957
public func index(of element: Element) -> Index? {
6058
if let result = _customIndexOfEquatableElement(element) {
@@ -93,8 +91,6 @@ extension Collection {
9391
/// - Returns: The index of the first element for which `predicate` returns
9492
/// `true`. If no elements in the collection satisfy the given predicate,
9593
/// returns `nil`.
96-
///
97-
/// - SeeAlso: `index(of:)`
9894
@_inlineable
9995
public func index(
10096
where predicate: (Element) throws -> Bool
@@ -252,8 +248,6 @@ extension ${Self} where Element : Comparable {
252248
/// // Prints "["Peter", "Kweku", "Kofi", "Akosua", "Abena"]"
253249
///
254250
/// - Returns: A sorted array of the ${sequenceKind}'s elements.
255-
///
256-
/// - SeeAlso: `sorted(by:)`, `sort()`
257251
@_inlineable
258252
public func sorted() -> [Element] {
259253
var result = ContiguousArray(self)
@@ -326,8 +320,6 @@ ${orderingExplanation}
326320
/// argument should be ordered before its second argument; otherwise,
327321
/// `false`.
328322
/// - Returns: A sorted array of the ${sequenceKind}'s elements.
329-
///
330-
/// - SeeAlso: `sorted()`, `sort(by:)`
331323
@_inlineable
332324
public func sorted(
333325
by areInIncreasingOrder:

stdlib/public/core/CompilerProtocols.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@
9898
/// // Prints "false"
9999
/// print(allowedMoves.rawValue & Directions.right.rawValue)
100100
/// // Prints "0"
101-
///
102-
/// - SeeAlso: `OptionSet`, `FixedWidthInteger`
103101
public protocol RawRepresentable {
104102
/// The raw type that can be used to represent all values of the conforming
105103
/// type.
@@ -183,8 +181,6 @@ public func != <T : Equatable>(lhs: T, rhs: T) -> Bool
183181
/// `Optional` type conforms to `ExpressibleByNilLiteral`.
184182
/// `ExpressibleByNilLiteral` conformance for types that use `nil` for other
185183
/// purposes is discouraged.
186-
///
187-
/// - SeeAlso: `Optional`
188184
public protocol ExpressibleByNilLiteral {
189185
/// Creates an instance initialized with `nil`.
190186
init(nilLiteral: ())

stdlib/public/core/EmptyCollection.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
//===----------------------------------------------------------------------===//
1919

2020
/// An iterator that never produces an element.
21-
///
22-
/// - SeeAlso: `EmptyCollection<Element>`.
2321
public struct EmptyIterator<Element> : IteratorProtocol, Sequence {
2422
/// Creates an instance.
2523
public init() {}

stdlib/public/core/Equatable.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ extension Equatable {
233233
/// - Parameters:
234234
/// - lhs: A reference to compare.
235235
/// - rhs: Another reference to compare.
236-
///
237-
/// - SeeAlso: `Equatable`, `==`, `!==`
238236
public func === (lhs: AnyObject?, rhs: AnyObject?) -> Bool {
239237
switch (lhs, rhs) {
240238
case let (l?, r?):
@@ -259,8 +257,6 @@ public func === (lhs: AnyObject?, rhs: AnyObject?) -> Bool {
259257
/// - Parameters:
260258
/// - lhs: A reference to compare.
261259
/// - rhs: Another reference to compare.
262-
///
263-
/// - SeeAlso: `Equatable`, `===`, `!=`
264260
public func !== (lhs: AnyObject?, rhs: AnyObject?) -> Bool {
265261
return !(lhs === rhs)
266262
}

stdlib/public/core/ExistentialCollection.swift.gyb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ internal func _abstract(
4141
/// This iterator forwards its `next()` method to an arbitrary underlying
4242
/// iterator having the same `Element` type, hiding the specifics of the
4343
/// underlying `IteratorProtocol`.
44-
///
45-
/// - SeeAlso: `AnySequence`
4644
@_fixed_layout
4745
public struct AnyIterator<Element> : IteratorProtocol {
4846
/// Creates an iterator that wraps a base iterator but whose type depends
@@ -731,8 +729,6 @@ internal struct _ClosureBasedSequence<Iterator : IteratorProtocol>
731729
/// An instance of `AnySequence` forwards its operations to an underlying base
732730
/// sequence having the same `Element` type, hiding the specifics of the
733731
/// underlying sequence.
734-
///
735-
/// - SeeAlso: `AnyIterator`
736732
//@_versioned
737733
@_fixed_layout
738734
public struct AnySequence<Element> : Sequence {
@@ -940,8 +936,6 @@ internal final class _IndexBox<
940936
}
941937

942938
/// A wrapper over an underlying index that hides the specific underlying type.
943-
///
944-
/// - SeeAlso: `AnyCollection`
945939
@_fixed_layout
946940
public struct AnyIndex {
947941
/// Creates a new index wrapping `base`.
@@ -1015,8 +1009,6 @@ protocol _AnyCollectionProtocol : Collection {
10151009
/// An `${Self}` instance forwards its operations to a base collection having the
10161010
/// same `Element` type, hiding the specifics of the underlying
10171011
/// collection.
1018-
///
1019-
/// - SeeAlso: ${', '.join('`Any%sCollection`' % t for t in (2 * TRAVERSALS)[ti + 1 : ti + 3]) }
10201012
@_fixed_layout
10211013
public struct ${Self}<Element>
10221014
: _AnyCollectionProtocol, ${SelfProtocol} {

0 commit comments

Comments
 (0)