Updated stdlib to use @discardableResult and _ = .

This commit is contained in:
Trent Nadeau
2016-05-09 18:59:19 -04:00
parent 5455f8634b
commit 6e327b4ddb
24 changed files with 49 additions and 8 deletions

View File

@@ -609,6 +609,7 @@ extension ${Self} {
@_transparent
@available(*, unavailable, message: "it has been removed in Swift 3")
@discardableResult
public prefix func ++ (x: inout ${Self}) -> ${Self} {
x = x + 1
return x
@@ -616,6 +617,7 @@ public prefix func ++ (x: inout ${Self}) -> ${Self} {
@_transparent
@available(*, unavailable, message: "it has been removed in Swift 3")
@discardableResult
public postfix func ++ (x: inout ${Self}) -> ${Self} {
let ret = x
x = x + 1
@@ -624,6 +626,7 @@ public postfix func ++ (x: inout ${Self}) -> ${Self} {
@_transparent
@available(*, unavailable, message: "it has been removed in Swift 3")
@discardableResult
public prefix func -- (x: inout ${Self}) -> ${Self} {
x = x - 1
return x
@@ -631,6 +634,7 @@ public prefix func -- (x: inout ${Self}) -> ${Self} {
@_transparent
@available(*, unavailable, message: "it has been removed in Swift 3")
@discardableResult
public postfix func -- (x: inout ${Self}) -> ${Self} {
let ret = x
x = x - 1