From 8f94a2bb75f310af4b05ab91327d71daf3bba3d2 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 27 Dec 2019 16:35:13 +0100 Subject: [PATCH] Rename UseExperimental->OptIn, Experimental->RequiresOptIn in stdlib kdocs --- libraries/stdlib/js/src/kotlin/annotations.kt | 4 ++-- .../stdlib/src/kotlin/annotations/ExperimentalStdlibApi.kt | 4 ++-- libraries/stdlib/src/kotlin/annotations/Multiplatform.kt | 4 ++-- libraries/stdlib/src/kotlin/contracts/ContractBuilder.kt | 4 ++-- libraries/stdlib/src/kotlin/experimental/inferenceMarker.kt | 4 ++-- libraries/stdlib/src/kotlin/time/ExperimentalTime.kt | 4 ++-- libraries/stdlib/unsigned/src/kotlin/annotations/Unsigned.kt | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libraries/stdlib/js/src/kotlin/annotations.kt b/libraries/stdlib/js/src/kotlin/annotations.kt index 1243840456f..b6f7c7cd0de 100644 --- a/libraries/stdlib/js/src/kotlin/annotations.kt +++ b/libraries/stdlib/js/src/kotlin/annotations.kt @@ -167,8 +167,8 @@ public annotation class JsQualifier(val value: String) * Note that behaviour of these annotations will likely be changed in the future. * * Usages of such annotations will be reported as warnings unless an explicit opt-in with - * the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalJsExport::class)`, - * or with the `-Xuse-experimental=kotlin.js.ExperimentalJsExport` compiler option is given. + * the [OptIn] annotation, e.g. `@OptIn(ExperimentalJsExport::class)`, + * or with the `-Xopt-in=kotlin.js.ExperimentalJsExport` compiler option is given. */ @Experimental(level = Experimental.Level.WARNING) @RequiresOptIn(level = RequiresOptIn.Level.WARNING) diff --git a/libraries/stdlib/src/kotlin/annotations/ExperimentalStdlibApi.kt b/libraries/stdlib/src/kotlin/annotations/ExperimentalStdlibApi.kt index 90e42aff95e..8bbca65c12e 100644 --- a/libraries/stdlib/src/kotlin/annotations/ExperimentalStdlibApi.kt +++ b/libraries/stdlib/src/kotlin/annotations/ExperimentalStdlibApi.kt @@ -11,8 +11,8 @@ import kotlin.annotation.AnnotationTarget.* * with the future versions of the standard library. * * Any usage of a declaration annotated with `@ExperimentalStdlibApi` must be accepted either by - * annotating that usage with the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalStdlibApi::class)`, - * or by using the compiler argument `-Xuse-experimental=kotlin.ExperimentalStdlibApi`. + * annotating that usage with the [OptIn] annotation, e.g. `@OptIn(ExperimentalStdlibApi::class)`, + * or by using the compiler argument `-Xopt-in=kotlin.ExperimentalStdlibApi`. */ @Experimental(level = Experimental.Level.ERROR) @RequiresOptIn(level = RequiresOptIn.Level.ERROR) diff --git a/libraries/stdlib/src/kotlin/annotations/Multiplatform.kt b/libraries/stdlib/src/kotlin/annotations/Multiplatform.kt index 607f2c76b60..58ba8c9b32e 100644 --- a/libraries/stdlib/src/kotlin/annotations/Multiplatform.kt +++ b/libraries/stdlib/src/kotlin/annotations/Multiplatform.kt @@ -13,8 +13,8 @@ import kotlin.internal.RequireKotlinVersionKind * The experimental multiplatform support API marker. * * Any usage of a declaration annotated with `@ExperimentalMultiplatform` must be accepted either by - * annotating that usage with the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalMultiplatform::class)`, - * or by using the compiler argument `-Xuse-experimental=kotlin.ExperimentalMultiplatform`. + * annotating that usage with the [OptIn] annotation, e.g. `@OptIn(ExperimentalMultiplatform::class)`, + * or by using the compiler argument `-Xopt-in=kotlin.ExperimentalMultiplatform`. */ @Experimental @RequiresOptIn diff --git a/libraries/stdlib/src/kotlin/contracts/ContractBuilder.kt b/libraries/stdlib/src/kotlin/contracts/ContractBuilder.kt index 875a8545c5c..b86dc3d2c32 100644 --- a/libraries/stdlib/src/kotlin/contracts/ContractBuilder.kt +++ b/libraries/stdlib/src/kotlin/contracts/ContractBuilder.kt @@ -13,8 +13,8 @@ import kotlin.internal.InlineOnly * when declaring contracts of user functions. * * Any usage of a declaration annotated with `@ExperimentalContracts` must be accepted either by - * annotating that usage with the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalContracts::class)`, - * or by using the compiler argument `-Xuse-experimental=kotlin.contracts.ExperimentalContracts`. + * annotating that usage with the [OptIn] annotation, e.g. `@OptIn(ExperimentalContracts::class)`, + * or by using the compiler argument `-Xopt-in=kotlin.contracts.ExperimentalContracts`. */ @Retention(AnnotationRetention.BINARY) @SinceKotlin("1.3") diff --git a/libraries/stdlib/src/kotlin/experimental/inferenceMarker.kt b/libraries/stdlib/src/kotlin/experimental/inferenceMarker.kt index cd1075f70dd..c803e98a10e 100644 --- a/libraries/stdlib/src/kotlin/experimental/inferenceMarker.kt +++ b/libraries/stdlib/src/kotlin/experimental/inferenceMarker.kt @@ -9,8 +9,8 @@ package kotlin.experimental * The experimental marker for type inference augmenting annotations. * * Any usage of a declaration annotated with `@ExperimentalTypeInference` must be accepted either by - * annotating that usage with the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalTypeInference::class)`, - * or by using the compiler argument `-Xuse-experimental=kotlin.experimental.ExperimentalTypeInference`. + * annotating that usage with the [OptIn] annotation, e.g. `@OptIn(ExperimentalTypeInference::class)`, + * or by using the compiler argument `-Xopt-in=kotlin.experimental.ExperimentalTypeInference`. */ @Experimental(level = Experimental.Level.ERROR) @RequiresOptIn(level = RequiresOptIn.Level.ERROR) diff --git a/libraries/stdlib/src/kotlin/time/ExperimentalTime.kt b/libraries/stdlib/src/kotlin/time/ExperimentalTime.kt index 4220179dc29..331979e67e4 100644 --- a/libraries/stdlib/src/kotlin/time/ExperimentalTime.kt +++ b/libraries/stdlib/src/kotlin/time/ExperimentalTime.kt @@ -15,8 +15,8 @@ import kotlin.annotation.AnnotationTarget.* * with the future versions of the standard library. * * Any usage of a declaration annotated with `@ExperimentalTime` must be accepted either by - * annotating that usage with the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalTime::class)`, - * or by using the compiler argument `-Xuse-experimental=kotlin.time.ExperimentalTime`. + * annotating that usage with the [OptIn] annotation, e.g. `@OptIn(ExperimentalTime::class)`, + * or by using the compiler argument `-Xopt-in=kotlin.time.ExperimentalTime`. */ @Experimental(level = Experimental.Level.ERROR) @RequiresOptIn(level = RequiresOptIn.Level.ERROR) diff --git a/libraries/stdlib/unsigned/src/kotlin/annotations/Unsigned.kt b/libraries/stdlib/unsigned/src/kotlin/annotations/Unsigned.kt index d61c6dc099e..0fc6bc48484 100644 --- a/libraries/stdlib/unsigned/src/kotlin/annotations/Unsigned.kt +++ b/libraries/stdlib/unsigned/src/kotlin/annotations/Unsigned.kt @@ -14,8 +14,8 @@ import kotlin.internal.RequireKotlinVersionKind * Marks the API that is dependent on the experimental unsigned types, including those types themselves. * * Usages of such API will be reported as warnings unless an explicit opt-in with - * the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalUnsignedTypes::class)`, - * or with the `-Xuse-experimental=kotlin.ExperimentalUnsignedTypes` compiler option is given. + * the [OptIn] annotation, e.g. `@OptIn(ExperimentalUnsignedTypes::class)`, + * or with the `-Xopt-in=kotlin.ExperimentalUnsignedTypes` compiler option is given. * * It's recommended to propagate the experimental status to the API that depends on unsigned types by annotating it with this annotation. */