diff --git a/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift b/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift index 480c60a5370bf..a7dfa75240038 100644 --- a/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift +++ b/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift @@ -32,11 +32,6 @@ public extension CGPoint { init(x: Double, y: Double) { self.init(x: CGFloat(x), y: CGFloat(y)) } - - @available(*, unavailable, renamed="zero") - static var zeroPoint: CGPoint { - fatalError("can't retrieve unavailable property") - } } extension CGPoint : Equatable {} @@ -61,11 +56,6 @@ public extension CGSize { init(width: Double, height: Double) { self.init(width: CGFloat(width), height: CGFloat(height)) } - - @available(*, unavailable, renamed="zero") - static var zeroSize: CGSize { - fatalError("can't retrieve unavailable property") - } } extension CGSize : Equatable {} @@ -90,11 +80,6 @@ public extension CGVector { init(dx: Double, dy: Double) { self.init(dx: CGFloat(dx), dy: CGFloat(dy)) } - - @available(*, unavailable, renamed="zero") - static var zeroVector: CGVector { - fatalError("can't retrieve unavailable property") - } } extension CGVector : Equatable {} @@ -274,87 +259,6 @@ public extension CGRect { func intersects(rect: CGRect) -> Bool { return CGRectIntersectsRect(self, rect) } - - @available(*, unavailable, renamed="zero") - static var zeroRect: CGRect { - fatalError("can't retrieve unavailable property") - } - - @available(*, unavailable, renamed="infinite") - static var infiniteRect: CGRect { - fatalError("can't retrieve unavailable property") - } - - @available(*, unavailable, renamed="null") - static var nullRect: CGRect { - fatalError("can't retrieve unavailable property") - } - - @available(*, unavailable, renamed="standardized") - var standardizedRect: CGRect { - fatalError("can't retrieve unavailable property") - } - - @available(*, unavailable, renamed="integral") - var integerRect: CGRect { - fatalError("can't retrieve unavailable property") - } - - @available(*, unavailable, renamed="standardizeInPlace") - mutating func standardize() -> CGRect { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="makeIntegralInPlace") - mutating func integerize() { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="insetBy") - func rectByInsetting(dx dx: CGFloat, dy: CGFloat) -> CGRect { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="insetInPlace") - func inset(dx dx: CGFloat, dy: CGFloat) { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="offsetBy") - func rectByOffsetting(dx dx: CGFloat, dy: CGFloat) -> CGRect { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="offsetInPlace") - func offset(dx dx: CGFloat, dy: CGFloat) { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="unionInPlace") - mutating func union(withRect: CGRect) { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="union") - func rectByUnion(withRect: CGRect) -> CGRect { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="intersectInPlace") - mutating func intersect(withRect: CGRect) { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="intersect") - func rectByIntersecting(withRect: CGRect) -> CGRect { - fatalError("can't call unavailable function") - } - - @available(*, unavailable, renamed="divide") - func rectsByDividing(atDistance: CGFloat, fromEdge: CGRectEdge) - -> (slice: CGRect, remainder: CGRect) { - fatalError("can't call unavailable function") - } } extension CGRect : Equatable {} diff --git a/stdlib/public/core/Algorithm.swift b/stdlib/public/core/Algorithm.swift index a09d908d9b7e1..55609f7492173 100644 --- a/stdlib/public/core/Algorithm.swift +++ b/stdlib/public/core/Algorithm.swift @@ -10,39 +10,6 @@ // //===----------------------------------------------------------------------===// -/// Returns the minimum element in `elements`. -/// -/// - Requires: `elements` is non-empty. O(`elements.count`). -@available(*, unavailable, message="call the 'minElement()' method on the sequence") -public func minElement< - R : SequenceType - where R.Generator.Element : Comparable>(elements: R) - -> R.Generator.Element { - fatalError("unavailable function can't be called") -} - -/// Returns the maximum element in `elements`. -/// -/// - Requires: `elements` is non-empty. O(`elements.count`). -@available(*, unavailable, message="call the 'maxElement()' method on the sequence") -public func maxElement< - R : SequenceType - where R.Generator.Element : Comparable>(elements: R) - -> R.Generator.Element { - fatalError("unavailable function can't be called") -} - -/// Returns the first index where `value` appears in `domain` or `nil` if -/// `value` is not found. -/// -/// - Complexity: O(`domain.count`). -@available(*, unavailable, message="call the 'indexOf()' method on the collection") -public func find< - C: CollectionType where C.Generator.Element : Equatable ->(domain: C, _ value: C.Generator.Element) -> C.Index? { - fatalError("unavailable function can't be called") -} - /// Returns the lesser of `x` and `y`. @warn_unused_result public func min(x: T, _ y: T) -> T { @@ -99,53 +66,6 @@ public func max(x: T, _ y: T, _ z: T, _ rest: T...) -> T { return r } -/// Returns the result of slicing `elements` into sub-sequences that -/// don't contain elements satisfying the predicate `isSeparator`. -/// -/// - parameter maxSplit: The maximum number of slices to return, minus 1. -/// If `maxSplit + 1` slices would otherwise be returned, the -/// algorithm stops splitting and returns a suffix of `elements`. -/// -/// - parameter allowEmptySlices: If `true`, an empty slice is produced in -/// the result for each pair of consecutive. -@available(*, unavailable, message="Use the split() method instead.") -public func split( - elements: S, - maxSplit: Int = Int.max, - allowEmptySlices: Bool = false, - @noescape isSeparator: (S.Generator.Element) -> R - ) -> [S.SubSequence] { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff the the initial elements of `s` are equal to `prefix`. -@available(*, unavailable, message="call the 'startsWith()' method on the sequence") -public func startsWith< - S0 : SequenceType, S1 : SequenceType - where - S0.Generator.Element == S1.Generator.Element, - S0.Generator.Element : Equatable ->(s: S0, _ prefix: S1) -> Bool -{ - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff `s` begins with elements equivalent to those of -/// `prefix`, using `isEquivalent` as the equivalence test. -/// -/// - Requires: `isEquivalent` is an [equivalence relation](http://en.wikipedia.org/wiki/Equivalence_relation). -@available(*, unavailable, message="call the 'startsWith()' method on the sequence") -public func startsWith< - S0 : SequenceType, S1 : SequenceType - where - S0.Generator.Element == S1.Generator.Element ->(s: S0, _ prefix: S1, - @noescape _ isEquivalent: (S1.Generator.Element, S1.Generator.Element) -> Bool) - -> Bool -{ - fatalError("unavailable function can't be called") -} - /// The `GeneratorType` for `EnumerateSequence`. `EnumerateGenerator` /// wraps a `Base` `GeneratorType` and yields successive `Int` values, /// starting at zero, along with the elements of the underlying @@ -209,105 +129,3 @@ public struct EnumerateSequence : SequenceType { } } -/// Returns a lazy `SequenceType` containing pairs (*n*, *x*), where -/// *n*s are consecutive `Int`s starting at zero, and *x*s are -/// the elements of `base`: -/// -/// > for (n, c) in enumerate("Swift".characters) { -/// print("\(n): '\(c)'" ) -/// } -/// 0: 'S' -/// 1: 'w' -/// 2: 'i' -/// 3: 'f' -/// 4: 't' -@available(*, unavailable, message="call the 'enumerate()' method on the sequence") -public func enumerate( - base: Seq -) -> EnumerateSequence { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff `a1` and `a2` contain the same elements in the -/// same order. -@available(*, unavailable, message="call the 'equalElements()' method on the sequence") -public func equal< - S1 : SequenceType, S2 : SequenceType - where - S1.Generator.Element == S2.Generator.Element, - S1.Generator.Element : Equatable ->(a1: S1, _ a2: S2) -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff `a1` and `a2` contain equivalent elements, using -/// `isEquivalent` as the equivalence test. -/// -/// - Requires: `isEquivalent` is an [equivalence relation](http://en.wikipedia.org/wiki/Equivalence_relation). -@available(*, unavailable, message="call the 'equalElements()' method on the sequence") -public func equal< - S1 : SequenceType, S2 : SequenceType - where - S1.Generator.Element == S2.Generator.Element ->(a1: S1, _ a2: S2, - @noescape _ isEquivalent: (S1.Generator.Element, S1.Generator.Element) -> Bool) - -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff `a1` precedes `a2` in a lexicographical ("dictionary") -/// ordering, using "<" as the comparison between elements. -@available(*, unavailable, message="call the 'lexicographicalCompare()' method on the sequence") -public func lexicographicalCompare< - S1 : SequenceType, S2 : SequenceType - where - S1.Generator.Element == S2.Generator.Element, - S1.Generator.Element : Comparable>( - a1: S1, _ a2: S2) -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff `a1` precedes `a2` in a lexicographical ("dictionary") -/// ordering, using `isOrderedBefore` as the comparison between elements. -/// -/// - Requires: `isOrderedBefore` is a -/// [strict weak ordering](http://en.wikipedia.org/wiki/Strict_weak_order#Strict_weak_orderings) -/// over the elements of `a1` and `a2`. -@available(*, unavailable, message="call the 'lexicographicalCompare()' method on the sequence") -public func lexicographicalCompare< - S1 : SequenceType, S2 : SequenceType - where - S1.Generator.Element == S2.Generator.Element ->( - a1: S1, _ a2: S2, - @noescape isOrderedBefore less: (S1.Generator.Element, S1.Generator.Element) - -> Bool -) -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff an element in `seq` satisfies `predicate`. -@available(*, unavailable, message="call the 'contains()' method on the sequence") -public func contains< - S : SequenceType, L : BooleanType ->(seq: S, @noescape _ predicate: (S.Generator.Element) -> L) -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns `true` iff `x` is in `seq`. -@available(*, unavailable, message="call the 'contains()' method on the sequence") -public func contains< - S : SequenceType where S.Generator.Element : Equatable ->(seq: S, _ x: S.Generator.Element) -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns the result of repeatedly calling `combine` with an -/// accumulated value initialized to `initial` and each element of -/// `sequence`, in turn. -@available(*, unavailable, message="call the 'reduce()' method on the sequence") -public func reduce( - sequence: S, _ initial: U, @noescape _ combine: (U, S.Generator.Element) -> U -) -> U { - fatalError("unavailable function can't be called") -} diff --git a/stdlib/public/core/Arrays.swift.gyb b/stdlib/public/core/Arrays.swift.gyb index 7badea9b687ab..f0d3ced4b2e61 100644 --- a/stdlib/public/core/Arrays.swift.gyb +++ b/stdlib/public/core/Arrays.swift.gyb @@ -169,9 +169,6 @@ ${SelfDocComment} public struct ${Self} : CollectionType, MutableCollectionType, _DestructorSafeContainer { - @available(*, unavailable, renamed="Element") - public typealias T = Element - %if Self == 'ArraySlice': /// The position of the first element in a non-empty collection. /// @@ -765,17 +762,6 @@ extension ${Self} : _ArrayType { } } - /// Returns a copy of `self` that has been sorted according to - /// `isOrderedBefore`. - /// - /// - Requires: `isOrderedBefore` induces a - /// [strict weak ordering](http://en.wikipedia.org/wiki/Strict_weak_order#Strict_weak_orderings) - /// over the elements. - @available(*, unavailable, message="call the 'sort()' method on the array") - public func sorted(isOrderedBefore: (Element, Element) -> Bool) -> ${Self} { - fatalError("unavailable function can't be called") - } - @warn_unused_result public func _copyToNativeArrayBuffer() -> _ContiguousArrayBuffer { return _extractOrCopyToNativeArrayBuffer(self._buffer) diff --git a/stdlib/public/core/BridgeObjectiveC.swift b/stdlib/public/core/BridgeObjectiveC.swift index d2914639a3d69..599fb30f28d2c 100644 --- a/stdlib/public/core/BridgeObjectiveC.swift +++ b/stdlib/public/core/BridgeObjectiveC.swift @@ -341,9 +341,6 @@ internal var _nilNativeObject: AnyObject? { public struct AutoreleasingUnsafeMutablePointer : Equatable, NilLiteralConvertible, _PointerType { - @available(*, unavailable, renamed="Memory") - public typealias T = Memory - public let _rawValue: Builtin.RawPointer @_transparent diff --git a/stdlib/public/core/CTypes.swift b/stdlib/public/core/CTypes.swift index 9807c49dbd18c..22cf1a42a91fb 100644 --- a/stdlib/public/core/CTypes.swift +++ b/stdlib/public/core/CTypes.swift @@ -154,13 +154,6 @@ public func ==(lhs: COpaquePointer, rhs: COpaquePointer) -> Bool { return Bool(Builtin.cmp_eq_RawPointer(lhs._rawValue, rhs._rawValue)) } -/// The family of C function pointer types. -/// -/// This type has been removed. Instead of `CFunctionType<(T) -> U>`, a native -/// function type with the C convention can be used, `@convention(c) (T) -> U`. -@available(*, unavailable, message="use a function type '@convention(c) (T) -> U'") -public struct CFunctionPointer {} - /// The corresponding Swift type to `va_list` in imported C APIs. public struct CVaListPointer { var value: UnsafeMutablePointer diff --git a/stdlib/public/core/Collection.swift b/stdlib/public/core/Collection.swift index ecee5d30fe368..37e99cbef2c10 100644 --- a/stdlib/public/core/Collection.swift +++ b/stdlib/public/core/Collection.swift @@ -10,11 +10,6 @@ // //===----------------------------------------------------------------------===// -@available(*, unavailable, message="access the 'count' property on the collection") -public func count (x: T) -> T.Index.Distance { - fatalError("unavailable function can't be called") -} - /// A protocol representing the minimal requirements of /// `CollectionType`. /// @@ -606,26 +601,6 @@ extension CollectionType { } } -/// Returns `true` iff `x` is empty. -@available(*, unavailable, message="access the 'isEmpty' property on the collection") -public func isEmpty(x: C) -> Bool { - fatalError("unavailable function can't be called") -} - -/// Returns the first element of `x`, or `nil` if `x` is empty. -@available(*, unavailable, message="access the 'first' property on the collection") -public func first(x: C) -> C.Generator.Element? { - fatalError("unavailable function can't be called") -} - -/// Returns the last element of `x`, or `nil` if `x` is empty. -@available(*, unavailable, message="access the 'last' property on the collection") -public func last( - x: C -) -> C.Generator.Element? { - fatalError("unavailable function can't be called") -} - /// A *collection* that supports subscript assignment. /// /// For any instance `a` of a type conforming to @@ -736,17 +711,6 @@ internal func _writeBackMutableSlice< "Can not replace a slice of a MutableCollectionType with a slice of a smaller size") } -/// Returns the range of `x`'s valid index values. -/// -/// The result's `endIndex` is the same as that of `x`. Because -/// `Range` is half-open, iterating the values of the result produces -/// all valid subscript arguments for `x`, omitting its `endIndex`. -@available(*, unavailable, message="access the 'indices' property on the collection") -public func indices< - C : CollectionType>(x: C) -> Range { - fatalError("unavailable function can't be called") -} - /// A *generator* that adapts a *collection* `C` and any *sequence* of /// its `Index` type to present the collection's elements in a /// permuted order. @@ -789,31 +753,3 @@ public protocol MutableSliceable : CollectionType, MutableCollectionType { subscript(_: Range) -> SubSequence { get set } } -@available(*, unavailable, message="Use the dropFirst() method instead.") -public func dropFirst(s: Seq) -> Seq.SubSequence { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="Use the dropLast() method instead.") -public func dropLast< - S : CollectionType - where S.Index: BidirectionalIndexType ->(s: S) -> S.SubSequence { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="Use the prefix() method.") -public func prefix(s: S, _ maxLength: Int) -> S.SubSequence { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="Use the suffix() method instead.") -public func suffix< - S : CollectionType where S.Index: BidirectionalIndexType ->(s: S, _ maxLength: Int) -> S.SubSequence { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="CollectionType") -public struct Sliceable {} - diff --git a/stdlib/public/core/CollectionOfOne.swift b/stdlib/public/core/CollectionOfOne.swift index 1be1b332f8215..9c8bc0c87518a 100644 --- a/stdlib/public/core/CollectionOfOne.swift +++ b/stdlib/public/core/CollectionOfOne.swift @@ -12,9 +12,6 @@ /// A generator that produces one or fewer instances of `Element`. public struct GeneratorOfOne : GeneratorType, SequenceType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Construct an instance that generates `element!`, or an empty /// sequence if `element == nil`. public init(_ element: Element?) { @@ -37,9 +34,6 @@ public struct GeneratorOfOne : GeneratorType, SequenceType { /// A collection containing a single element of type `Element`. public struct CollectionOfOne : CollectionType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// A type that represents a valid position in the collection. /// /// Valid indices consist of the position of every element and a diff --git a/stdlib/public/core/EmptyCollection.swift b/stdlib/public/core/EmptyCollection.swift index 0d1a653a3c491..52eed62b7b8f8 100644 --- a/stdlib/public/core/EmptyCollection.swift +++ b/stdlib/public/core/EmptyCollection.swift @@ -21,9 +21,6 @@ /// /// - SeeAlso: `EmptyCollection`. public struct EmptyGenerator : GeneratorType, SequenceType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Construct an instance. public init() {} @@ -35,9 +32,6 @@ public struct EmptyGenerator : GeneratorType, SequenceType { /// A collection whose element type is `Element` but that is always empty. public struct EmptyCollection : CollectionType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// A type that represents a valid position in the collection. /// /// Valid indices consist of the position of every element and a diff --git a/stdlib/public/core/Existential.swift b/stdlib/public/core/Existential.swift index 50ddd3d99c10d..88ec891ff233d 100644 --- a/stdlib/public/core/Existential.swift +++ b/stdlib/public/core/Existential.swift @@ -18,14 +18,6 @@ // Policy.swift. Similar components should usually be defined next to // their respective protocols. -/// Unavailable; use `AnyGenerator` instead. -@available(*, unavailable, renamed="AnyGenerator") -public struct GeneratorOf {} - -/// Unavailable; use `AnySequence` instead. -@available(*, unavailable, renamed="AnySequence") -public struct SequenceOf {} - internal struct _CollectionOf< IndexType_ : ForwardIndexType, T > : CollectionType { @@ -61,6 +53,3 @@ internal struct _CollectionOf< let _subscriptImpl: (IndexType_)->T } -@available(*, unavailable, message="SinkOf has been removed. Use (T)->() closures directly instead.") -public struct SinkOf {} - diff --git a/stdlib/public/core/ExistentialCollection.swift.gyb b/stdlib/public/core/ExistentialCollection.swift.gyb index 5f1962836cefb..71aa4e1ca7e46 100644 --- a/stdlib/public/core/ExistentialCollection.swift.gyb +++ b/stdlib/public/core/ExistentialCollection.swift.gyb @@ -31,9 +31,6 @@ internal func _abstract(file: StaticString = __FILE__, line: UInt = __LINE__) { /// - seealso: /// - `struct AnySequence` public struct AnyGenerator : GeneratorType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Create a `GeneratorType` instance that wraps `base` but whose type /// depends only on the type of `G.Element`. /// @@ -81,16 +78,6 @@ public struct AnyGenerator : GeneratorType { /// traversing the sequence consumes the generator. extension AnyGenerator : SequenceType {} -@available(*, unavailable, renamed="AnyGenerator") -public func anyGenerator(base: G) -> AnyGenerator { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="AnyGenerator") -public func anyGenerator(body: ()->Element?) -> AnyGenerator { - fatalError("unavailable function can't be called") -} - internal struct _ClosureBasedGenerator : GeneratorType { internal init(_ body: () -> Element?) { self._body = body @@ -220,9 +207,6 @@ internal struct _ClosureBasedSequence /// /// - SeeAlso: `AnyGenerator`. public struct AnySequence : SequenceType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Wrap and forward operations to to `base`. public init(_ base: S) { _box = _SequenceBox(base) @@ -549,9 +533,6 @@ public func !== < /// /// - SeeAlso: ${', '.join('`Any%sType`' % t for t in (2 * traversals)[ti + 1 : ti + 3]) } public struct Any${Traversal}Collection : AnyCollectionType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - typealias Box = _AnyCollectionBox % for SubTraversal in traversals[ti:]: diff --git a/stdlib/public/core/Filter.swift b/stdlib/public/core/Filter.swift index a6244f633aec1..b7b98bddf0a16 100644 --- a/stdlib/public/core/Filter.swift +++ b/stdlib/public/core/Filter.swift @@ -132,9 +132,6 @@ public struct LazyFilterIndex< /// The predicate used to determine which elements of `base` are /// also elements of `self`. internal let _include: (BaseElements.Generator.Element)->Bool - - @available(*, unavailable, renamed="BaseElements") - public typealias Base = BaseElements } /// Returns `true` iff `lhs` is identical to `rhs`. @@ -257,24 +254,6 @@ extension LazyCollectionType { } } -/// Return an `Array` containing the elements of `source`, -/// in order, that satisfy the predicate `includeElement`. -@available(*, unavailable, message="call the 'filter()' method on the sequence") -public func filter( - source: S, _ includeElement: (S.Generator.Element) -> Bool -) -> [S.Generator.Element] { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="FilterSequence") -public struct FilterSequenceView {} - -@available(*, unavailable, renamed="FilterCollectionIndex") -public struct FilterCollectionViewIndex {} - -@available(*, unavailable, renamed="FilterCollection") -public struct FilterCollectionView {} - // ${'Local Variables'}: // eval: (read-only-mode 1) // End: diff --git a/stdlib/public/core/FixedPoint.swift.gyb b/stdlib/public/core/FixedPoint.swift.gyb index 51c8e0604e5e7..6efc2e7caf39e 100644 --- a/stdlib/public/core/FixedPoint.swift.gyb +++ b/stdlib/public/core/FixedPoint.swift.gyb @@ -655,12 +655,6 @@ public func _leadingZeros(x: Builtin.Int${bits}) -> Builtin.Int${bits} { //===--- End loop over all integer types ----------------------------------===// -@available(*, unavailable, renamed="Int") -public typealias Word = Int - -@available(*, unavailable, renamed="UInt") -public typealias UWord = UInt - // ${'Local Variables'}: // eval: (read-only-mode 1) // End: diff --git a/stdlib/public/core/HashedCollections.swift.gyb b/stdlib/public/core/HashedCollections.swift.gyb index e34b712798a96..ab0325e04d6dd 100644 --- a/stdlib/public/core/HashedCollections.swift.gyb +++ b/stdlib/public/core/HashedCollections.swift.gyb @@ -279,9 +279,6 @@ internal struct _UnmanagedAnyObjectArray { public struct Set : Hashable, CollectionType, ArrayLiteralConvertible { - @available(*, unavailable, renamed="Element") - public typealias T = Element - internal typealias _Self = Set internal typealias _VariantStorage = _VariantSetStorage internal typealias _NativeStorage = _NativeSetStorage @@ -3652,9 +3649,6 @@ public struct ${Self}Index<${TypeParametersDecl}> : %if Self == 'Set': internal typealias Key = ${TypeParameters} internal typealias Value = ${TypeParameters} - - @available(*, unavailable, renamed="Element") - public typealias T = Element %end internal var _value: ${Self}IndexRepresentation<${TypeParameters}> @@ -3874,11 +3868,6 @@ public struct ${Self}Generator<${TypeParametersDecl}> : GeneratorType { _Native${Self}StorageOwner<${TypeParameters}> internal typealias _NativeIndex = _Native${Self}Index<${TypeParameters}> -%if Self == 'Set': - @available(*, unavailable, renamed="Element") - public typealias T = Element -%end - internal var _state: ${Self}GeneratorRepresentation<${TypeParameters}> internal static func _Native( diff --git a/stdlib/public/core/ImplicitlyUnwrappedOptional.swift b/stdlib/public/core/ImplicitlyUnwrappedOptional.swift index f1ab6ea1af68f..ff4f6fe82f17e 100644 --- a/stdlib/public/core/ImplicitlyUnwrappedOptional.swift +++ b/stdlib/public/core/ImplicitlyUnwrappedOptional.swift @@ -21,9 +21,6 @@ public enum ImplicitlyUnwrappedOptional case None case Some(Wrapped) - @available(*, unavailable, renamed="Wrapped") - public typealias T = Wrapped - /// Construct a `nil` instance. public init() { self = .None } diff --git a/stdlib/public/core/Index.swift b/stdlib/public/core/Index.swift index ad8c259aa199e..e465b6e3d9e8b 100644 --- a/stdlib/public/core/Index.swift +++ b/stdlib/public/core/Index.swift @@ -14,26 +14,6 @@ // //===----------------------------------------------------------------------===// -//===----------------------------------------------------------------------===// -//===--- Dispatching advance and distance functions -----------------------===// -// These generic functions are for user consumption; they dispatch to the -// appropriate implementation for T. - -@available(*, unavailable, message="call the 'distanceTo(end)' method on the index") -public func distance(start: T, _ end: T) -> T.Distance { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="call the 'advancedBy(n)' method on the index") -public func advance(start: T, _ n: T.Distance) -> T { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="call the 'advancedBy(n, limit:)' method on the index") -public func advance(start: T, _ n: T.Distance, _ end: T) -> T { - fatalError("unavailable function can't be called") -} - //===----------------------------------------------------------------------===// //===--- ForwardIndexType -------------------------------------------------===// diff --git a/stdlib/public/core/Interval.swift.gyb b/stdlib/public/core/Interval.swift.gyb index 1da7a5c8f4fb1..7ca339b56b49f 100644 --- a/stdlib/public/core/Interval.swift.gyb +++ b/stdlib/public/core/Interval.swift.gyb @@ -60,9 +60,6 @@ ${selfDocComment} public struct ${Self} : IntervalType, Equatable, CustomStringConvertible, CustomDebugStringConvertible, _Reflectable { - @available(*, unavailable, renamed="Bound") - public typealias T = Bound - /// Construct a copy of `x`. public init(_ x: ${Self}) { // This initializer exists only so that we can have a descriptive @@ -171,13 +168,6 @@ extension IntervalType { } } -@available(*, unavailable, message="call the 'overlaps(other)' method on the interval") -public func overlaps< - I0: IntervalType, I1: IntervalType where I0.Bound == I1.Bound ->(lhs: I0, _ rhs: I1) -> Bool { - fatalError("unavailable function can't be called") -} - /// Returns a half-open interval from `start` to `end`. @warn_unused_result public func ..< ( diff --git a/stdlib/public/core/Join.swift b/stdlib/public/core/Join.swift index 901d6e0cc410b..1f3b37b74095d 100644 --- a/stdlib/public/core/Join.swift +++ b/stdlib/public/core/Join.swift @@ -180,13 +180,3 @@ extension SequenceType where Generator.Element : SequenceType { } } -@available(*, unavailable, message="call the 'joinWithSeparator()' method on the sequence of elements") -public func join< - C : RangeReplaceableCollectionType, S : SequenceType - where S.Generator.Element == C ->( - separator: C, _ elements: S -) -> C { - fatalError("unavailable function can't be called") -} - diff --git a/stdlib/public/core/LazyCollection.swift b/stdlib/public/core/LazyCollection.swift index d811b87ce4359..a469d3154a747 100644 --- a/stdlib/public/core/LazyCollection.swift +++ b/stdlib/public/core/LazyCollection.swift @@ -163,9 +163,6 @@ extension LazyCollection : CollectionType { public var first: Base.Generator.Element? { return _base.first } - - @available(*, unavailable, renamed="Base") - public typealias S = Void } /// Augment `self` with lazy methods such as `map`, `filter`, etc. @@ -187,18 +184,6 @@ extension LazyCollectionType { } } -@available(*, unavailable, message="Please use the collection's '.lazy' property") -public func lazy(s: Base) -> LazyCollection { - fatalError("unavailable") -} - -@available(*, unavailable, renamed="LazyCollection") -public struct LazyForwardCollection {} -@available(*, unavailable, renamed="LazyCollection") -public struct LazyBidirectionalCollection {} -@available(*, unavailable, renamed="LazyCollection") -public struct LazyRandomAccessCollection {} - // ${'Local Variables'}: // eval: (read-only-mode 1) // End: diff --git a/stdlib/public/core/LazySequence.swift b/stdlib/public/core/LazySequence.swift index aadcc0045b66a..5d0c91438ba5a 100644 --- a/stdlib/public/core/LazySequence.swift +++ b/stdlib/public/core/LazySequence.swift @@ -147,13 +147,6 @@ public protocol LazySequenceType : SequenceType { /// it has a default implementation in a protocol extension that /// just returns `self`. var elements: Elements {get} - - var array: [Generator.Element] {get} -} - -extension LazySequenceType { - @available(*, unavailable, message="please construct an Array from your lazy sequence: Array(...)") - public var array: [Generator.Element] { fatalError("unavailable") } } /// When there's no special associated `Elements` type, the `elements` @@ -182,9 +175,6 @@ public struct LazySequence /// The `Base` (presumably non-lazy) sequence from which `self` was created. public var elements: Base { return _base } - - @available(*, unavailable, renamed="Base") - public typealias S = Void } extension SequenceType { @@ -207,8 +197,3 @@ extension LazySequenceType { } } -@available(*, unavailable, message="Please use the sequence's '.lazy' property") -public func lazy(s: Base) -> LazySequence { - fatalError("unavailable") -} - diff --git a/stdlib/public/core/Map.swift b/stdlib/public/core/Map.swift index db885411e7f1a..c6d6c3ce369f6 100644 --- a/stdlib/public/core/Map.swift +++ b/stdlib/public/core/Map.swift @@ -16,9 +16,6 @@ public struct LazyMapGenerator< Base : GeneratorType, Element > : GeneratorType, SequenceType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Advance to the next element and return it, or `nil` if no next /// element exists. /// @@ -72,9 +69,6 @@ public struct LazyMapSequence public var _base: Base internal var _transform: (Base.Generator.Element)->Element - - @available(*, unavailable, renamed="Element") - public typealias T = Element } //===--- Collections ------------------------------------------------------===// @@ -134,9 +128,6 @@ public struct LazyMapCollection public var _base: Base var _transform: (Base.Generator.Element)->Element - - @available(*, unavailable, renamed="Element") - public typealias T = Element } //===--- Support for s.lazy ----------------------------------------------===// @@ -165,33 +156,6 @@ extension LazyCollectionType { } } -/// Return an `Array` containing the results of mapping `transform` -/// over `source`. -@available(*, unavailable, message="call the 'map()' method on the sequence") -public func map( - source: C, _ transform: (C.Generator.Element) -> T -) -> [T] { - fatalError("unavailable function can't be called") -} - -/// Return an `Array` containing the results of mapping `transform` -/// over `source` and flattening the result. -@available(*, unavailable, message="call the 'flatMap()' method on the sequence") -public func flatMap( - source: C, _ transform: (C.Generator.Element) -> [T] -) -> [T] { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="LazyMapGenerator") -public struct MapSequenceGenerator {} - -@available(*, unavailable, renamed="LazyMapSequence") -public struct MapSequenceView {} - -@available(*, unavailable, renamed="LazyMapCollection") -public struct MapCollectionView {} - // ${'Local Variables'}: // eval: (read-only-mode 1) // End: diff --git a/stdlib/public/core/Mirror.swift b/stdlib/public/core/Mirror.swift index 380c27e6bf48d..2c28c43cb3b4a 100644 --- a/stdlib/public/core/Mirror.swift +++ b/stdlib/public/core/Mirror.swift @@ -823,6 +823,3 @@ extension Mirror : CustomReflectable { } } -@available(*, unavailable, renamed="PlaygroundQuickLook") -public typealias QuickLookObject = PlaygroundQuickLook - diff --git a/stdlib/public/core/OptionSet.swift b/stdlib/public/core/OptionSet.swift index 1498921a6ad4a..d6d1a43a83035 100644 --- a/stdlib/public/core/OptionSet.swift +++ b/stdlib/public/core/OptionSet.swift @@ -162,5 +162,3 @@ extension OptionSetType where RawValue : BitwiseOperationsType { } } -@available(*, unavailable, renamed="OptionSetType") -public typealias RawOptionSetType = OptionSetType diff --git a/stdlib/public/core/Optional.swift b/stdlib/public/core/Optional.swift index 4f81e50b73fdc..7d9ada417bb77 100644 --- a/stdlib/public/core/Optional.swift +++ b/stdlib/public/core/Optional.swift @@ -16,9 +16,6 @@ public enum Optional : _Reflectable, NilLiteralConvertible { case None case Some(Wrapped) - @available(*, unavailable, renamed="Wrapped") - public typealias T = Wrapped - /// Construct a `nil` instance. @_transparent public init() { self = .None } @@ -77,26 +74,6 @@ extension Optional : CustomDebugStringConvertible { } } -// While this free function may seem obsolete, since an optional is -// often expressed as (x as Wrapped), it can lead to cleaner usage, i.e. -// -// map(x as Wrapped) { ... } -// vs -// (x as Wrapped).map { ... } -// -/// Haskell's fmap for Optionals. -@available(*, unavailable, message="call the 'map()' method on the optional value") -public func map(x: T?, @noescape _ f: (T)->U) -> U? { - fatalError("unavailable function can't be called") -} - - -/// Returns `f(self)!` iff `self` and `f(self)` are not nil. -@available(*, unavailable, message="call the 'flatMap()' method on the optional value") -public func flatMap(x: T?, @noescape _ f: (T)->U?) -> U? { - fatalError("unavailable function can't be called") -} - // Intrinsics for use by language features. @_transparent public // COMPILER_INTRINSIC diff --git a/stdlib/public/core/OutputStream.swift b/stdlib/public/core/OutputStream.swift index cf68151642b25..f3338a83dc64e 100644 --- a/stdlib/public/core/OutputStream.swift +++ b/stdlib/public/core/OutputStream.swift @@ -283,55 +283,6 @@ extension UnicodeScalar : Streamable { } } -//===----------------------------------------------------------------------===// -// Unavailable APIs -//===----------------------------------------------------------------------===// - -@available(*, unavailable, renamed="CustomDebugStringConvertible") -public typealias DebugPrintable = CustomDebugStringConvertible -@available(*, unavailable, renamed="CustomStringConvertible") -public typealias Printable = CustomStringConvertible - -@available(*, unavailable, renamed="print") -public func println( - value: T, inout _ target: TargetStream -) { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="print") -public func println(value: T) { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="use print(\"\")") -public func println() { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="String") -public func toString(x: T) -> String { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, message="use debugPrint()") -public func debugPrintln( - x: T, inout _ target: TargetStream -) { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="debugPrint") -public func debugPrintln(x: T) { - fatalError("unavailable function can't be called") -} - -/// Returns the result of `debugPrint`'ing `x` into a `String`. -@available(*, unavailable, message="use String(reflecting:)") -public func toDebugString(x: T) -> String { - fatalError("unavailable function can't be called") -} - /// A hook for playgrounds to print through. public var _playgroundPrintHook : ((String)->Void)? = {_ in () } diff --git a/stdlib/public/core/Policy.swift b/stdlib/public/core/Policy.swift index 5d072539ab43b..beacc9ea01ecd 100644 --- a/stdlib/public/core/Policy.swift +++ b/stdlib/public/core/Policy.swift @@ -326,10 +326,6 @@ public protocol Hashable : Equatable { var hashValue: Int { get } } -public protocol _SinkType {} -@available(*, unavailable, message="SinkType has been removed. Use (T)->() closures directly instead.") -public typealias SinkType = _SinkType - //===----------------------------------------------------------------------===// // Standard pattern matching forms //===----------------------------------------------------------------------===// diff --git a/stdlib/public/core/Print.swift b/stdlib/public/core/Print.swift index b26f0974e3a9e..d2b39eb165446 100644 --- a/stdlib/public/core/Print.swift +++ b/stdlib/public/core/Print.swift @@ -159,11 +159,6 @@ public func print(_: T) {} @available(*, unavailable, message="Please wrap your tuple argument in parentheses: 'debugPrint((...))'") public func debugPrint(_: T) {} -@available(*, unavailable, message="Please use 'terminator: \"\"' instead of 'appendNewline: false': 'print((...), terminator: \"\")'") -public func print(_: T, appendNewline: Bool) {} -@available(*, unavailable, message="Please use 'terminator: \"\"' instead of 'appendNewline: false': 'debugPrint((...), terminator: \"\")'") -public func debugPrint(_: T, appendNewline: Bool) {} - //===--- FIXME: Not working due to ----------------------===// @available(*, unavailable, message="Please use the 'toStream' label for the target stream: 'print((...), toStream: &...)'") @@ -171,11 +166,5 @@ public func print(_: T, inout _: OutputStreamType) {} @available(*, unavailable, message="Please use the 'toStream' label for the target stream: 'debugPrint((...), toStream: &...))'") public func debugPrint(_: T, inout _: OutputStreamType) {} -@available(*, unavailable, message="Please use 'terminator: \"\"' instead of 'appendNewline: false' and use the 'toStream' label for the target stream: 'print((...), terminator: \"\", toStream: &...)'") -public func print(_: T, inout _: OutputStreamType, appendNewline: Bool) {} -@available(*, unavailable, message="Please use 'terminator: \"\"' instead of 'appendNewline: false' and use the 'toStream' label for the target stream: 'debugPrint((...), terminator: \"\", toStream: &...)'") -public func debugPrint( - _: T, inout _: OutputStreamType, appendNewline: Bool -) {} //===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===// diff --git a/stdlib/public/core/Range.swift b/stdlib/public/core/Range.swift index ea214964e49f6..8928b35fabf89 100644 --- a/stdlib/public/core/Range.swift +++ b/stdlib/public/core/Range.swift @@ -15,9 +15,6 @@ public struct RangeGenerator< Element : ForwardIndexType > : GeneratorType, SequenceType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Construct an instance that traverses the elements of `bounds`. @_transparent public init(_ bounds: Range) { @@ -75,9 +72,6 @@ public struct Range< > : Equatable, CollectionType, CustomStringConvertible, CustomDebugStringConvertible { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Construct a copy of `x`. public init(_ x: Range) { // This initializer exists only so that we can have a diff --git a/stdlib/public/core/RangeReplaceableCollectionType.swift b/stdlib/public/core/RangeReplaceableCollectionType.swift index 9017e8a895bae..28fbb7925b7ea 100644 --- a/stdlib/public/core/RangeReplaceableCollectionType.swift +++ b/stdlib/public/core/RangeReplaceableCollectionType.swift @@ -337,109 +337,6 @@ extension RangeReplaceableCollectionType where Index : BidirectionalIndexType { } } -/// Insert `newElement` into `x` at index `i`. -/// -/// Invalidates all indices with respect to `x`. -/// -/// - Complexity: O(`x.count`). -@available(*, unavailable, message="call the 'insert()' method on the collection") -public func insert< - C: RangeReplaceableCollectionType ->(inout x: C, _ newElement: C.Generator.Element, atIndex i: C.Index) { - fatalError("unavailable function can't be called") -} - -/// Insert `newElements` into `x` at index `i`. -/// -/// Invalidates all indices with respect to `x`. -/// -/// - Complexity: O(`x.count + newElements.count`). -@available(*, unavailable, message="call the 'insertContentsOf()' method on the collection") -public func splice< - C: RangeReplaceableCollectionType, - S : CollectionType where S.Generator.Element == C.Generator.Element ->(inout x: C, _ newElements: S, atIndex i: C.Index) { - fatalError("unavailable function can't be called") -} - -/// Remove from `x` and return the element at index `i`. -/// -/// Invalidates all indices with respect to `x`. -/// -/// - Complexity: O(`x.count`). -@available(*, unavailable, message="call the 'removeAtIndex()' method on the collection") -public func removeAtIndex< - C: RangeReplaceableCollectionType ->(inout x: C, _ index: C.Index) -> C.Generator.Element { - fatalError("unavailable function can't be called") -} - -/// Remove from `x` the indicated `subRange` of elements. -/// -/// Invalidates all indices with respect to `x`. -/// -/// - Complexity: O(`x.count`). -@available(*, unavailable, message="call the 'removeRange()' method on the collection") -public func removeRange< - C: RangeReplaceableCollectionType ->(inout x: C, _ subRange: Range) { - fatalError("unavailable function can't be called") -} - -/// Remove all elements from `x`. -/// -/// Invalidates all indices with respect to `x`. -/// -/// - parameter keepCapacity: If `true`, is a non-binding request to -/// avoid releasing storage, which can be a useful optimization -/// when `x` is going to be grown again. -/// -/// - Complexity: O(`x.count`). -@available(*, unavailable, message="call the 'removeAll()' method on the collection") -public func removeAll< - C: RangeReplaceableCollectionType ->(inout x: C, keepCapacity: Bool = false) { - fatalError("unavailable function can't be called") -} - -/// Append elements from `newElements` to `x`. -/// -/// - Complexity: O(N). -@available(*, unavailable, message="call the 'appendContentsOf()' method on the collection") -public func extend< - C: RangeReplaceableCollectionType, - S : SequenceType where S.Generator.Element == C.Generator.Element ->(inout x: C, _ newElements: S) { - fatalError("unavailable function can't be called") -} - -extension RangeReplaceableCollectionType { - @available(*, unavailable, renamed="appendContentsOf") - public mutating func extend< - S : SequenceType - where S.Generator.Element == Generator.Element - >(newElements: S) { - fatalError("unavailable function can't be called") - } - - @available(*, unavailable, renamed="insertContentsOf") - public mutating func splice< - S : CollectionType where S.Generator.Element == Generator.Element - >(newElements: S, atIndex i: Index) { - fatalError("unavailable function can't be called") - } -} - -/// Remove an element from the end of `x` in O(1). -/// -/// - Requires: `x` is nonempty. -@available(*, unavailable, message="call the 'removeLast()' method on the collection") -public func removeLast< - C: RangeReplaceableCollectionType where C.Index : BidirectionalIndexType ->(inout x: C) -> C.Generator.Element { - fatalError("unavailable function can't be called") -} - @warn_unused_result public func +< C : RangeReplaceableCollectionType, @@ -491,5 +388,3 @@ public func +< return lhs } -@available(*, unavailable, renamed="RangeReplaceableCollectionType") -public typealias ExtensibleCollectionType = RangeReplaceableCollectionType diff --git a/stdlib/public/core/Reflection.swift b/stdlib/public/core/Reflection.swift index c95c973f7915a..2a940aebec499 100644 --- a/stdlib/public/core/Reflection.swift +++ b/stdlib/public/core/Reflection.swift @@ -473,8 +473,3 @@ struct _MetatypeMirror : _MirrorType { var disposition: _MirrorDisposition { return .Aggregate } } -@available(*, unavailable, message="call the 'Mirror(reflecting:)' initializer") -public func reflect(x: T) -> _MirrorType { - fatalError("unavailable function can't be called") -} - diff --git a/stdlib/public/core/Repeat.swift b/stdlib/public/core/Repeat.swift index a05ac9beb77f2..197abdfa6c412 100644 --- a/stdlib/public/core/Repeat.swift +++ b/stdlib/public/core/Repeat.swift @@ -12,10 +12,6 @@ /// A collection whose elements are all identical `Element`s. public struct Repeat : CollectionType { - - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// A type that represents a valid position in the collection. /// /// Valid indices consist of the position of every element and a diff --git a/stdlib/public/core/Reverse.swift b/stdlib/public/core/Reverse.swift index cf24fb34847d6..1b1c0cfad3fbe 100644 --- a/stdlib/public/core/Reverse.swift +++ b/stdlib/public/core/Reverse.swift @@ -61,9 +61,6 @@ public struct ReverseIndex /// - if `n` != `c.count`, then `c.reverse[self]` is /// equivalent to `[self.base.predecessor()]`. public let base: Base - - @available(*, unavailable, renamed="Base") - public typealias I = Base } @warn_unused_result @@ -98,9 +95,6 @@ public struct ReverseRandomAccessIndex public func advancedBy(n: Distance) -> ReverseRandomAccessIndex { return ReverseRandomAccessIndex(base.advancedBy(-n)) } - - @available(*, unavailable, renamed="Base") - public typealias I = Base } public protocol _ReverseCollectionType : CollectionType { @@ -164,9 +158,6 @@ public struct ReverseCollection< public typealias Generator = IndexingGenerator public let _base: Base - - @available(*, unavailable, renamed="Base") - public typealias T = Base } /// A Collection that presents the elements of its `Base` collection @@ -199,9 +190,6 @@ public struct ReverseRandomAccessCollection< > public let _base: Base - - @available(*, unavailable, renamed="Base") - public typealias T = Base } extension CollectionType where Index : BidirectionalIndexType { @@ -250,25 +238,6 @@ where Index : RandomAccessIndexType, Elements.Index : RandomAccessIndexType { } } -/// Return an `Array` containing the elements of `source` in reverse -/// order. -@available(*, unavailable, message="call the 'reverse()' method on the collection") -public func reverse( - source: C -) -> [C.Generator.Element] { - fatalError("unavailable function can't be called") -} - -@available(*, unavailable, renamed="ReverseCollection") -public struct BidirectionalReverseView< - Base : CollectionType where Base.Index : BidirectionalIndexType -> {} - -@available(*, unavailable, renamed="ReverseRandomAccessCollection") -public struct RandomAccessReverseView< - Base : CollectionType where Base.Index : RandomAccessIndexType -> {} - // ${'Local Variables'}: // eval: (read-only-mode 1) // End: diff --git a/stdlib/public/core/Sequence.swift b/stdlib/public/core/Sequence.swift index f4a3a2e5178da..50d2e8e9a84cb 100644 --- a/stdlib/public/core/Sequence.swift +++ b/stdlib/public/core/Sequence.swift @@ -602,14 +602,6 @@ extension SequenceType { public func dropLast() -> SubSequence { return dropLast(1) } } -/// Return an underestimate of the number of elements in the given -/// sequence, without consuming the sequence. For Sequences that are -/// actually Collections, this will return `x.count`. -@available(*, unavailable, message="call the 'underestimateCount()' method on the sequence") -public func underestimateCount(x: T) -> Int { - fatalError("unavailable function can't be called") -} - extension SequenceType { public func _initializeTo(ptr: UnsafeMutablePointer) -> UnsafeMutablePointer { @@ -632,10 +624,6 @@ extension SequenceType { public struct GeneratorSequence< Base : GeneratorType > : GeneratorType, SequenceType { - - @available(*, unavailable, renamed="Base") - public typealias G = Base - /// Construct an instance whose generator is a copy of `base`. public init(_ base: Base) { _base = base diff --git a/stdlib/public/core/Sort.swift.gyb b/stdlib/public/core/Sort.swift.gyb index 1681bcbc171f2..e1f9d2bac55d4 100644 --- a/stdlib/public/core/Sort.swift.gyb +++ b/stdlib/public/core/Sort.swift.gyb @@ -84,27 +84,6 @@ func _insertionSort< } } -/// Re-order the given `range` of `elements` and return a pivot index -/// *p*. -/// -/// - Postcondition: For all *i* in `range.startIndex..<`*p*, and *j* -/// in *p*`..( - inout elements: C, - _ range: Range ${"," if p else ""} - ${"_ isOrderedBefore: (C.Generator.Element, C.Generator.Element)->Bool" if p else ""} -) -> C.Index { - fatalError("unavailable function can't be called") -} - func _partition< C: MutableCollectionType where C.Index: RandomAccessIndexType ${"" if p else ", C.Generator.Element : Comparable"} @@ -280,81 +259,6 @@ func _heapSort< } } -%{ -if p: - sortIsUnstable = """\ -/// The sorting algorithm is not stable (can change the relative order of -/// elements for which `isOrderedBefore` does not establish an order).""" -else: - sortIsUnstable = """\ -/// The sorting algorithm is not stable (can change the relative order of -/// elements that compare equal).""" - -}% - -/// Sort `collection` in-place${according}. -/// -${sortIsUnstable} -/// -${orderingRequirement} -@available(*, unavailable, message="call the 'sortInPlace()' method on the collection") -public func sort< - C: MutableCollectionType where C.Index: RandomAccessIndexType - ${"" if p else ", C.Generator.Element : Comparable"} ->( - inout collection: C ${"," if p else ""} - ${"_ isOrderedBefore: (C.Generator.Element, C.Generator.Element)->Bool" if p else ""} -) { - fatalError("unavailable function can't be called") -} - -/// Sort `array` in-place${according}. -/// -${sortIsUnstable} -/// -${orderingRequirement} -% if p: -@available(*, unavailable, message="call the 'sortInPlace()' method on the collection") -public func sort(inout array: [T], _ isOrderedBefore: (T, T) -> Bool) { -% else: -@available(*, unavailable, message="call the 'sortInPlace()' method on the collection") -public func sort(inout array: [T]) { -% end - fatalError("unavailable function can't be called") -} - -/// Sort `array` in-place${according}. -/// -${sortIsUnstable} -/// -${orderingRequirement} -% if p: -@available(*, unavailable, message="call the 'sortInPlace()' method on the collection") -public func sort( - inout array: ContiguousArray, - _ isOrderedBefore: (T, T) -> Bool -) { -% else: -@available(*, unavailable, message="call the 'sortInPlace()' method on the collection") -public func sort(inout array: ContiguousArray) { -% end - fatalError("unavailable function can't be called") -} - -/// Return an `Array` containing the sorted elements of `source`${according}. -/// -${sortIsUnstable} -/// -${orderingRequirement} -@available(*, unavailable, message="call the 'sort()' method on the collection") -public func sorted< - C: SequenceType${"" if p else " where C.Generator.Element : Comparable"} ->( - source: C ${"," if p else ""} - ${"_ isOrderedBefore: (C.Generator.Element, C.Generator.Element)->Bool" if p else ""} -) -> [C.Generator.Element] { - fatalError("unavailable function can't be called") -} % end // for p in preds diff --git a/stdlib/public/core/Stride.swift b/stdlib/public/core/Stride.swift index 10c855c676000..85fdf3017a726 100644 --- a/stdlib/public/core/Stride.swift +++ b/stdlib/public/core/Stride.swift @@ -122,9 +122,6 @@ public func -= ( /// A GeneratorType for `StrideTo`. public struct StrideToGenerator : GeneratorType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - var current: Element let end: Element let stride: Element.Stride @@ -145,9 +142,6 @@ public struct StrideToGenerator : GeneratorType { public struct StrideTo : SequenceType { // FIXME: should really be a CollectionType, as it is multipass - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Return a *generator* over the elements of this *sequence*. /// /// - Complexity: O(1). @@ -179,18 +173,8 @@ extension Strideable { } } -@available(*, unavailable, message="call the 'stride(to:by:)' method instead") -public func stride< - T : Strideable ->(from start: T, to end: T, by stride: T.Stride) -> StrideTo { - fatalError("unavailable function can't be called") -} - /// A GeneratorType for `StrideThrough`. public struct StrideThroughGenerator : GeneratorType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - var current: Element let end: Element let stride: Element.Stride @@ -219,9 +203,6 @@ public struct StrideThroughGenerator : GeneratorType { public struct StrideThrough : SequenceType { // FIXME: should really be a CollectionType, as it is multipass - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Return a *generator* over the elements of this *sequence*. /// /// - Complexity: O(1). @@ -256,9 +237,3 @@ extension Strideable { } } -@available(*, unavailable, message="call the 'stride(through:by:)' method instead") -public func stride< - T : Strideable ->(from start: T, through end: T, by stride: T.Stride) -> StrideThrough { - fatalError("unavailable function can't be called") -} diff --git a/stdlib/public/core/String.swift b/stdlib/public/core/String.swift index 5f2a89ac76c12..10621aa7bba8c 100644 --- a/stdlib/public/core/String.swift +++ b/stdlib/public/core/String.swift @@ -606,15 +606,6 @@ extension String { } } -extension String { - @available(*, unavailable, message="call the 'joinWithSeparator()' method on the sequence of elements") - public func join< - S : SequenceType where S.Generator.Element == String - >(elements: S) -> String { - fatalError("unavailable function can't be called") - } -} - extension SequenceType where Generator.Element == String { /// Interpose the `separator` between elements of `self`, then concatenate diff --git a/stdlib/public/core/StringLegacy.swift b/stdlib/public/core/StringLegacy.swift index 6d70c600fd497..0dff7c17bf081 100644 --- a/stdlib/public/core/StringLegacy.swift +++ b/stdlib/public/core/StringLegacy.swift @@ -140,17 +140,6 @@ extension String { } } -// Conversions from string to other types. -extension String { - /// If the string represents an integer that fits into an Int, returns - /// the corresponding integer. This accepts strings that match the regular - /// expression "[-+]?[0-9]+" only. - @available(*, unavailable, message="Use Int() initializer") - public func toInt() -> Int? { - fatalError("unavailable function can't be called") - } -} - extension String { /// Produce a substring of the given string from the given character /// index to the end of the string. diff --git a/stdlib/public/core/Unmanaged.swift b/stdlib/public/core/Unmanaged.swift index d055d558c19dc..81934ea3e1c11 100644 --- a/stdlib/public/core/Unmanaged.swift +++ b/stdlib/public/core/Unmanaged.swift @@ -15,9 +15,6 @@ /// When you use this type, you become partially responsible for /// keeping the object alive. public struct Unmanaged { - @available(*, unavailable, renamed="Instance") - public typealias T = Instance - internal unowned(unsafe) var _value: Instance @_transparent diff --git a/stdlib/public/core/UnsafeBufferPointer.swift.gyb b/stdlib/public/core/UnsafeBufferPointer.swift.gyb index 3be9f5f76c001..0a731f9c3d195 100644 --- a/stdlib/public/core/UnsafeBufferPointer.swift.gyb +++ b/stdlib/public/core/UnsafeBufferPointer.swift.gyb @@ -15,9 +15,6 @@ public struct UnsafeBufferPointerGenerator : GeneratorType, SequenceType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Advance to the next element and return it, or `nil` if no next /// element exists. public mutating func next() -> Element? { @@ -36,9 +33,6 @@ public struct UnsafeBufferPointerGenerator public struct Unsafe${Mutable}BufferPointer : ${Mutable}CollectionType { - @available(*, unavailable, renamed="Element") - public typealias T = Element - /// Always zero, which is the index of the first element in a /// non-empty buffer. public var startIndex: Int { diff --git a/stdlib/public/core/UnsafePointer.swift.gyb b/stdlib/public/core/UnsafePointer.swift.gyb index 3435d3de738da..f68d678d9d166 100644 --- a/stdlib/public/core/UnsafePointer.swift.gyb +++ b/stdlib/public/core/UnsafePointer.swift.gyb @@ -40,9 +40,6 @@ public struct ${Self} : RandomAccessIndexType, Hashable, NilLiteralConvertible, _PointerType { - @available(*, unavailable, renamed="Memory") - public typealias T = Memory - public typealias Distance = Int /// The underlying raw (untyped) pointer. diff --git a/stdlib/public/core/Zip.swift b/stdlib/public/core/Zip.swift index 1eccb37149d6b..35f26ea072ad8 100644 --- a/stdlib/public/core/Zip.swift +++ b/stdlib/public/core/Zip.swift @@ -96,13 +96,3 @@ public struct Zip2Sequence internal let _sequences: (Sequence1, Sequence2) } -@available(*, unavailable, renamed="Zip2Generator") -public struct ZipGenerator2< - Generator1 : GeneratorType, Generator2 : GeneratorType -> {} - -@available(*, unavailable, renamed="Zip2Sequence") -public struct Zip2< - Sequence1 : SequenceType, Sequence2 : SequenceType -> {} - diff --git a/test/1_stdlib/CollectionDiagnostics.swift b/test/1_stdlib/CollectionDiagnostics.swift index 1c4d8b7717065..36105f32c9986 100644 --- a/test/1_stdlib/CollectionDiagnostics.swift +++ b/test/1_stdlib/CollectionDiagnostics.swift @@ -203,173 +203,3 @@ func == (lhs: BadRandomAccessIndex3, rhs: BadRandomAccessIndex3) -> Bool { fatalError("not implemented") } -extension Array { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension ArraySlice { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension ContiguousArray { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension Set { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension SetGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension SetIndex { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension Repeat { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension GeneratorOfOne { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension CollectionOfOne { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension EmptyGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension EmptyCollection { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension UnsafeBufferPointerGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension UnsafeBufferPointer { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension UnsafeMutableBufferPointer { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension Range { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension RangeGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension StrideToGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension StrideTo { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension StrideThroughGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension StrideThrough { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension AnyGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension AnySequence { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension AnyForwardCollection { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension AnyBidirectionalCollection { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension AnyRandomAccessCollection { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension FilterSequenceView {} // expected-error {{'FilterSequenceView' has been renamed to 'FilterSequence'}} {{11-29=FilterSequence}} -extension FilterCollectionViewIndex {} // expected-error {{'FilterCollectionViewIndex' has been renamed to 'FilterCollectionIndex'}} {{11-36=FilterCollectionIndex}} -extension FilterCollectionView {} // expected-error {{'FilterCollectionView' has been renamed to 'FilterCollection'}} {{11-31=FilterCollection}} - -extension LazyMapGenerator { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension LazyMapSequence { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} -extension LazyMapCollection { - func foo(element: T) {} // expected-error {{'T' has been renamed to 'Element'}} {{21-22=Element}} -} - -extension MapSequenceGenerator {} // expected-error {{'MapSequenceGenerator' has been renamed to 'LazyMapGenerator'}} {{11-31=LazyMapGenerator}} -extension MapSequenceView {} // expected-error {{'MapSequenceView' has been renamed to 'LazyMapSequence'}} {{11-26=LazyMapSequence}} -extension MapCollectionView {} // expected-error {{'MapCollectionView' has been renamed to 'LazyMapCollection'}} {{11-28=LazyMapCollection}} - -extension LazySequence { - func foo(base: S) {} // expected-error {{'S' has been renamed to 'Base'}} {{18-19=Base}} - func bar() { _ = self.array } // expected-error {{please construct an Array from your lazy sequence}} -} -extension LazyCollection { - func foo(base: S) {} // expected-error {{'S' has been renamed to 'Base'}} {{18-19=Base}} -} - -func foo(_:LazyForwardCollection) // expected-error {{'LazyForwardCollection' has been renamed to 'LazyCollection'}} {{15-36=LazyCollection}} -func foo(_:LazyBidirectionalCollection) // expected-error {{'LazyBidirectionalCollection' has been renamed to 'LazyCollection'}} {{15-42=LazyCollection}} -func foo(_:LazyRandomAccessCollection) // expected-error {{'LazyRandomAccessCollection' has been renamed to 'LazyCollection'}} {{15-41=LazyCollection}} - -extension ReverseIndex { - func foo(base: I) {} // expected-error {{'I' has been renamed to 'Base'}} {{18-19=Base}} -} -extension ReverseRandomAccessIndex { - func foo(base: I) {} // expected-error {{'I' has been renamed to 'Base'}} {{18-19=Base}} -} -extension ReverseCollection { - func foo(base: T) {} // expected-error {{'T' has been renamed to 'Base'}} {{18-19=Base}} -} -extension ReverseRandomAccessCollection { - func foo(base: T) {} // expected-error {{'T' has been renamed to 'Base'}} {{18-19=Base}} -} - -extension BidirectionalReverseView {} // expected-error {{'BidirectionalReverseView' has been renamed to 'ReverseCollection'}} {{11-35=ReverseCollection}} -extension RandomAccessReverseView {} // expected-error {{'RandomAccessReverseView' has been renamed to 'ReverseRandomAccessCollection'}} {{11-34=ReverseRandomAccessCollection}} - -extension GeneratorSequence { - func foo(base: G) {} // expected-error {{'G' has been renamed to 'Base'}} {{18-19=Base}} -} - -extension ZipGenerator2 {} // expected-error {{'ZipGenerator2' has been renamed to 'Zip2Generator'}} {{11-24=Zip2Generator}} -extension Zip2 {} // expected-error {{'Zip2' has been renamed to 'Zip2Sequence'}} {{11-15=Zip2Sequence}} - -extension UnsafePointer { - func foo(memory: T) {} // expected-error {{'T' has been renamed to 'Memory'}} {{20-21=Memory}} -} -extension UnsafeMutablePointer { - func foo(memory: T) {} // expected-error {{'T' has been renamed to 'Memory'}} {{20-21=Memory}} -} - -extension HalfOpenInterval { - func foo(bound: T) {} // expected-error {{'T' has been renamed to 'Bound'}} {{19-20=Bound}} -} -extension ClosedInterval { - func foo(bound: T) {} // expected-error {{'T' has been renamed to 'Bound'}} {{19-20=Bound}} -} - -extension Unmanaged { - func foo(instance: T) {} // expected-error {{'T' has been renamed to 'Instance'}} {{22-23=Instance}} -} - -struct MyCollection : Sliceable {} // expected-error {{'Sliceable' has been renamed to 'CollectionType'}} {{23-32=CollectionType}} -protocol MyProtocol : Sliceable {} // expected-error {{'Sliceable' has been renamed to 'CollectionType'}} {{23-32=CollectionType}} -func processCollection(e: E) {} // expected-error {{'Sliceable' has been renamed to 'CollectionType'}} {{28-37=CollectionType}} - -func renamedRangeReplaceableCollectionTypeMethods(c: DefaultedForwardRangeReplaceableCollection) { - var c = c - c.extend([ 10 ]) // expected-error {{'extend' has been renamed to 'appendContentsOf'}} {{5-11=appendContentsOf}} - c.splice([ 10 ], atIndex: c.startIndex) // expected-error {{'splice(_:atIndex:)' has been renamed to 'insertContentsOf'}} {{5-11=insertContentsOf}} -} - -func renamedAnyGenerator(g: G) { - _ = anyGenerator(g) // expected-error {{'anyGenerator' has been renamed to 'AnyGenerator'}} - _ = anyGenerator { 1 } // expected-error {{'anyGenerator' has been renamed to 'AnyGenerator'}} -} - diff --git a/test/1_stdlib/CollectionDiagnosticsObjC.swift b/test/1_stdlib/CollectionDiagnosticsObjC.swift deleted file mode 100644 index 909ec56f3685b..0000000000000 --- a/test/1_stdlib/CollectionDiagnosticsObjC.swift +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %target-parse-verify-swift - -// REQUIRES: objc_interop - -extension AutoreleasingUnsafeMutablePointer { - func foo(memory: T) {} // expected-error {{'T' has been renamed to 'Memory'}} {{20-21=Memory}} -} - diff --git a/test/1_stdlib/MirrorDiagnostics.swift b/test/1_stdlib/MirrorDiagnostics.swift deleted file mode 100644 index f89d5b0f19a87..0000000000000 --- a/test/1_stdlib/MirrorDiagnostics.swift +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %target-parse-verify-swift - -func useQuickLookObject(object: QuickLookObject) {} // expected-error {{'QuickLookObject' has been renamed to 'PlaygroundQuickLook'}} {{33-48=PlaygroundQuickLook}} - -func useReflecting() { - reflect(1) // expected-error {{'reflect' is unavailable: call the 'Mirror(reflecting:)' initializer}} -} - diff --git a/test/1_stdlib/PrintDiagnostics.swift b/test/1_stdlib/PrintDiagnostics.swift index 014e4169ee782..75f77e7578a09 100644 --- a/test/1_stdlib/PrintDiagnostics.swift +++ b/test/1_stdlib/PrintDiagnostics.swift @@ -2,11 +2,7 @@ var stream = "" -print(3, appendNewline: false) // expected-error {{'print(_:appendNewline:)' is unavailable: Please use 'terminator: ""' instead of 'appendNewline: false': 'print((...), terminator: "")'}} -debugPrint(3, appendNewline: false) // expected-error {{'debugPrint(_:appendNewline:)' is unavailable: Please use 'terminator: ""' instead of 'appendNewline: false': 'debugPrint((...), terminator: "")'}} - print(3, &stream) // expected-error{{'&' used with non-inout argument of type 'Any'}} debugPrint(3, &stream) // expected-error{{'&' used with non-inout argument of type 'Any'}} -print(3, &stream, appendNewline: false) // expected-error {{cannot pass immutable value as inout argument: implicit conversion from 'String' to 'OutputStreamType' requires a temporary}} -debugPrint(3, &stream, appendNewline: false) // expected-error {{cannot pass immutable value as inout argument: implicit conversion from 'String' to 'OutputStreamType' requires a temporary}} print(4, quack: 5) // expected-error {{'print' is unavailable: Please wrap your tuple argument in parentheses: 'print((...))'}} +debugPrint(4, quack: 5) // expected-error {{'debugPrint' is unavailable: Please wrap your tuple argument in parentheses: 'debugPrint((...))'}} diff --git a/test/Constraints/diagnostics.swift b/test/Constraints/diagnostics.swift index 0cb613254b936..cc4bf91f58f83 100644 --- a/test/Constraints/diagnostics.swift +++ b/test/Constraints/diagnostics.swift @@ -110,12 +110,24 @@ infix operator ***~ { func ***~(_: Int, _: String) { } i ***~ i // expected-error{{cannot convert value of type 'Int' to expected argument type 'String'}} +@available(*, unavailable, message="call the 'map()' method on the sequence") +public func myMap( + source: C, _ transform: (C.Generator.Element) -> T +) -> [T] { + fatalError("unavailable function can't be called") +} + +@available(*, unavailable, message="call the 'map()' method on the optional value") +public func myMap(x: T?, @noescape _ f: (T)->U) -> U? { + fatalError("unavailable function can't be called") +} + // // FIXME: poor diagnostic, to be fixed in 20142462. For now, we just want to // make sure that it doesn't crash. func rdar20142523() { - map(0..<10, { x in // expected-error{{cannot invoke 'map' with an argument list of type '(Range, (_) -> _)'}} - // expected-note @-1 {{overloads for 'map' exist with these partially matching parameter lists: (C, (C.Generator.Element) -> T), (T?, @noescape (T) -> U)}} + myMap(0..<10, { x in // expected-error{{cannot invoke 'myMap' with an argument list of type '(Range, (_) -> _)'}} + // expected-note @-1 {{overloads for 'myMap' exist with these partially matching parameter lists: (C, (C.Generator.Element) -> T), (T?, @noescape (T) -> U)}} () return x // expected-error {{type of expression is ambiguous without more context}} }) diff --git a/test/FixCode/fixits-apply.swift b/test/FixCode/fixits-apply.swift index 502684b181e55..9f9911ef8d7c6 100644 --- a/test/FixCode/fixits-apply.swift +++ b/test/FixCode/fixits-apply.swift @@ -40,17 +40,6 @@ func foo() -> Int { func goo(var e : ErrorType) {} -struct Test1 : RawOptionSetType { - init(rawValue: Int) {} - var rawValue: Int { return 0 } -} - -print("", appendNewline: false) -Swift.print("", appendNewline: false) -print("", appendNewline: true) -print("", false, appendNewline: false) -print("", false) - func ftest1() { // Don't replace the variable name with '_' let myvar = 0 diff --git a/test/FixCode/fixits-apply.swift.result b/test/FixCode/fixits-apply.swift.result index 8afd86dccf359..39092673286af 100644 --- a/test/FixCode/fixits-apply.swift.result +++ b/test/FixCode/fixits-apply.swift.result @@ -40,17 +40,6 @@ func foo() -> Int { func goo(e : ErrorType) {} -struct Test1 : OptionSetType { - init(rawValue: Int) {} - var rawValue: Int { return 0 } -} - -print("", terminator: "") -Swift.print("", terminator: "") -print("", terminator: "\n") -print("", false, appendNewline: false) -print("", false) - func ftest1() { // Don't replace the variable name with '_' let myvar = 0 diff --git a/test/attr/attr_objc.swift b/test/attr/attr_objc.swift index 75e8cdc0753d2..653f0dfd87d07 100644 --- a/test/attr/attr_objc.swift +++ b/test/attr/attr_objc.swift @@ -1694,9 +1694,6 @@ class HasNSManaged { func mutableAutoreleasingUnsafeMutablePointerToAnyObject(p: AutoreleasingUnsafeMutablePointer) {} // CHECK-LABEL: {{^}} @objc func mutableAutoreleasingUnsafeMutablePointerToAnyObject(p: AutoreleasingUnsafeMutablePointer) { - - func cFunctionPointer(p: CFunctionPointer<() -> ()>) {} // expected-error{{unavailable}} - // CHECK-LABEL: {{^}} func cFunctionPointer(p: <>) -> <> } // @objc with nullary names diff --git a/validation-test/compiler_crashers/27298-swift-modulefile-gettype.swift b/validation-test/compiler_crashers/27298-swift-modulefile-gettype.swift index 6edede4dde96a..412354d9eda0e 100644 --- a/validation-test/compiler_crashers/27298-swift-modulefile-gettype.swift +++ b/validation-test/compiler_crashers/27298-swift-modulefile-gettype.swift @@ -1,4 +1,4 @@ -// RUN: not --crash %target-swift-frontend %s -parse +// RUN: not %target-swift-frontend %s -parse // Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) diff --git a/validation-test/stdlib/FixedPointDiagnostics.swift.gyb b/validation-test/stdlib/FixedPointDiagnostics.swift.gyb index f9ab6588a678e..0cf6d0ad4a5fa 100644 --- a/validation-test/stdlib/FixedPointDiagnostics.swift.gyb +++ b/validation-test/stdlib/FixedPointDiagnostics.swift.gyb @@ -131,6 +131,3 @@ let u32_ops: UInt32 = testOps(5, 2) let s64_ops: Int64 = testOps(5, 2) let u64_ops: UInt64 = testOps(5, 2) -func useWord(w: Word) {} // expected-error {{'Word' has been renamed to 'Int'}} -func useUWord(w: UWord) {} // expected-error {{'UWord' has been renamed to 'UInt'}} -