stdlib: adopt @warn_unused_result

rdar://20957486

Swift SVN r31048
This commit is contained in:
Dmitri Hrybenko
2015-08-06 14:53:18 +00:00
parent 10bdef0936
commit dd3194a18c
74 changed files with 789 additions and 82 deletions

View File

@@ -37,6 +37,7 @@ extension CollectionType where ${GElement} : Equatable {
/// `value` is not found.
///
/// - Complexity: O(`self.count`).
@warn_unused_result
public func indexOf(element: ${GElement}) -> Index? {
if let result = _customIndexOfEquatableElement(element) {
return result
@@ -56,6 +57,7 @@ extension CollectionType {
/// corresponding value, or `nil` if such value is not found.
///
/// - Complexity: O(`self.count`).
@warn_unused_result
public func indexOf(
@noescape predicate: (${GElement}) throws -> Bool
) rethrows -> Index? {