diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 224e18a0c50..e540edc3e9c 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -5785,78 +5785,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 a69519760e9..9cc280ce8ea 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -1008,14 +1008,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 7b093cd8129..64c60dae6ab 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -504,14 +504,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 50824913775..8abe6511b88 100644 --- a/libraries/stdlib/src/generated/_Strings.kt +++ b/libraries/stdlib/src/generated/_Strings.kt @@ -514,14 +514,6 @@ public fun CharSequence.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 00dec1a06bb..03fd5cdf41f 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt @@ -104,13 +104,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) include(CharSequences)