diff options
author | Philipp Haller <hallerp@gmail.com> | 2011-03-17 09:55:42 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2011-03-17 09:55:42 +0000 |
commit | c9822430643f44386cb02f595212a2c5bc66b38f (patch) | |
tree | 30dd416d146e86187403d100db061083b5de1653 /src/library | |
parent | eb0b73b1160c7e62e2ae0e338a9664b8b53ddbde (diff) | |
download | scala-c9822430643f44386cb02f595212a2c5bc66b38f.tar.gz scala-c9822430643f44386cb02f595212a2c5bc66b38f.tar.bz2 scala-c9822430643f44386cb02f595212a2c5bc66b38f.zip |
Removed uniqueness annotations. Review by rytz.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/annotation/unique/package.scala | 41 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/peer.scala | 18 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/transient.scala | 19 | ||||
-rw-r--r-- | src/library/scala/annotation/unique/unique.scala | 17 |
4 files changed, 0 insertions, 95 deletions
diff --git a/src/library/scala/annotation/unique/package.scala b/src/library/scala/annotation/unique/package.scala deleted file mode 100644 index 1cb652a084..0000000000 --- a/src/library/scala/annotation/unique/package.scala +++ /dev/null @@ -1,41 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation - -/** - * An object that provides methods for capturing unique references, and - * for accessing unique fields. - * - * @author Philipp Haller - * @since 2.9 - */ -package object unique { - - trait Captured[A] { - def captured: A - def capturedBy[B](other: B): A = captured - } - - implicit def mkCaptured[A](x: A) = new Captured[A] { - def captured: A = x - } - - /* Swaps an object stored in a unique field with another unique object. - * - * The unique object that is the new value of the unique field becomes - * unusable by the caller. - * - * @param to the unique field that is the target of the swap - * @param from the unique object that is moved into the unique field - * @return the unique object that was the value of the unique - * field before the swap - */ - def swap[A, B <: A](to: A, from: B): A = to - -} diff --git a/src/library/scala/annotation/unique/peer.scala b/src/library/scala/annotation/unique/peer.scala deleted file mode 100644 index 72e41a18af..0000000000 --- a/src/library/scala/annotation/unique/peer.scala +++ /dev/null @@ -1,18 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation.unique - -/** - * An annotation that indicates that the annotated parameter is in the - * same region as the parameter that is the argument of the annotation. - * - * @author Philipp Haller - * @since 2.9 - */ -final class peer(x: AnyRef) extends annotation.StaticAnnotation diff --git a/src/library/scala/annotation/unique/transient.scala b/src/library/scala/annotation/unique/transient.scala deleted file mode 100644 index 48301bfd5d..0000000000 --- a/src/library/scala/annotation/unique/transient.scala +++ /dev/null @@ -1,19 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation.unique - -/** - * An annotation that indicates that the annotated parameter is transient. - * A transient parameter is borrowed in the sense that it is unique but it - * cannot be consumed. - * - * @author Philipp Haller - * @since 2.9 - */ -final class transient extends annotation.StaticAnnotation diff --git a/src/library/scala/annotation/unique/unique.scala b/src/library/scala/annotation/unique/unique.scala deleted file mode 100644 index 62ca474178..0000000000 --- a/src/library/scala/annotation/unique/unique.scala +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.annotation.unique - -/** - * An annotation that indicates that the annotated parameter or field is unique. - * - * @author Philipp Haller - * @since 2.9 - */ -final class unique extends annotation.StaticAnnotation |