[stdlib] Deprecated PlaygroundQuickLook and CustomPlaygroundQuickLookable.

Deprecated the `PlaygroundQuickLook` enum and `CustomPlaygroundQuickLookable`
protocol. These are being targeted for removal in Swift 5, so we want to
unconditionally deprecate them now to encourage use of
`CustomPlaygroundDisplayConvertible` instead.

This commit includes deprecated the various `CustomPlaygroundQuickLookable`
conformances across the standard library and overlay libraries.
This commit is contained in:
Connor Wakamo
2018-02-16 14:42:10 -08:00
parent 4c41c12066
commit a2aacd73dd
18 changed files with 24 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
@_exported import Foundation // Clang module
extension NSURL : CustomPlaygroundQuickLookable {
@available(*, deprecated, message: "NSURL.customPlaygroundQuickLook will be removed in a future Swift version")
public var customPlaygroundQuickLook: PlaygroundQuickLook {
guard let str = absoluteString else { return .text("Unknown URL") }
return .url(str)