diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 6025e28014f..d79636e25e9 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -5707,78 +5707,6 @@ public fun ShortArray.toHashSet(): HashSet { return toCollection(HashSet(mapCapacity(size))) } -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun Array.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun BooleanArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun ByteArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun CharArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun DoubleArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun FloatArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun IntArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun LongArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun ShortArray.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - /** * Returns a [List] containing all elements. */ diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index f4c9b28b7cf..a57008d417a 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -1050,14 +1050,6 @@ public fun Iterable.toHashSet(): HashSet { return toCollection(HashSet(mapCapacity(collectionSizeOrDefault(12)))) } -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun Iterable.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - /** * Returns a [List] containing all elements. */ diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index 80305a7466f..add7fa7f37e 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -508,14 +508,6 @@ public fun Sequence.toHashSet(): HashSet { return toCollection(HashSet()) } -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun Sequence.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - /** * Returns a [List] containing all elements. */ diff --git a/libraries/stdlib/src/generated/_Strings.kt b/libraries/stdlib/src/generated/_Strings.kt index 2e9f4011a0e..f9952c65a88 100644 --- a/libraries/stdlib/src/generated/_Strings.kt +++ b/libraries/stdlib/src/generated/_Strings.kt @@ -783,14 +783,6 @@ public fun String.toHashSet(): HashSet { return toCollection(HashSet(mapCapacity(length))) } -/** - * Returns a [LinkedList] containing all elements. - */ -@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())")) -public fun String.toLinkedList(): LinkedList { - return toCollection(LinkedList()) -} - /** * Returns a [List] containing all characters. */ diff --git a/libraries/stdlib/src/kotlin/util/Functions.kt b/libraries/stdlib/src/kotlin/util/Functions.kt deleted file mode 100644 index 04c05822fda..00000000000 --- a/libraries/stdlib/src/kotlin/util/Functions.kt +++ /dev/null @@ -1,18 +0,0 @@ -package kotlin - -/** - * Converts a function that takes one argument and returns a value of the same type to a generator function. - * The generator function calls this function, passing to it either [initialValue] on the first iteration - * or the previously returned value on subsequent iterations, and returns the returned value. - */ -@Deprecated("This function will be removed soon. If you need generator function to create a sequence, use the 'sequence' function instead.") -public fun Function1.toGenerator(initialValue: T): Function0 { - var nextValue: T? = initialValue - return { - nextValue?.let { result -> - nextValue = this@toGenerator(result) - result - } - } -} - diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt index 4d6f62f909a..688bcb1d7dd 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt @@ -110,13 +110,6 @@ fun snapshots(): List { body { "return this.toArrayList()" } } - templates add f("toLinkedList()") { - include(Strings) - doc { "Returns a [LinkedList] containing all elements." } - returns("LinkedList") - deprecate { Deprecation("Use toCollection(LinkedList()) instead.", replaceWith = "toCollection(LinkedList())") } - } - templates add f("toMap(selector: (T) -> K)") { inline(true) deprecate(Strings) { forBinaryCompatibility }