Merge pull request #872 from apple/revert-838-revert-833-userinfoprovider-use-error

diff --git a/Foundation/NSLocale.swift b/Foundation/NSLocale.swift
index f556df2..52becd1 100644
--- a/Foundation/NSLocale.swift
+++ b/Foundation/NSLocale.swift
@@ -236,12 +236,14 @@
 }
 
 
-public func ==(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
-    return lhs.rawValue == rhs.rawValue
-}
+extension NSLocale.Key {
+    public static func ==(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
+        return lhs.rawValue == rhs.rawValue
+    }
 
-public func <(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
-    return lhs.rawValue < rhs.rawValue
+    public static func <(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
+        return lhs.rawValue < rhs.rawValue
+    }
 }