about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2014-01-14 05:17:19 -0500
committerDaniel Micay <danielmicay@gmail.com>2014-01-14 17:13:22 -0500
commitf40d5b1050fc727170d79d42ef6cbf0c6b826bfd (patch)
tree9aeeb9f119e87c1ffe9b81c0e3fbb96c621ad29d /src
parent77eeddaa481fa083dfa857e5d7dd7f5ab784a9f1 (diff)
downloadrust-f40d5b1050fc727170d79d42ef6cbf0c6b826bfd.tar.gz
rust-f40d5b1050fc727170d79d42ef6cbf0c6b826bfd.zip
add an experimental tag for Gc<T> due to cycles
This type isn't yet very useful since it only pretends cycles won't be
a problem. Anyone using it should be made aware that they're going to
leak.
Diffstat (limited to 'src')
-rw-r--r--src/libstd/gc.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs
index 4cbecc9b42f..9985a280fa5 100644
--- a/src/libstd/gc.rs
+++ b/src/libstd/gc.rs
@@ -16,6 +16,8 @@ collector is task-local so `Gc<T>` is not sendable.
 
 */
 
+#[allow(experimental)];
+
 use kinds::Send;
 use clone::{Clone, DeepClone};
 use managed;
@@ -24,6 +26,9 @@ use managed;
 #[lang="gc"]
 #[cfg(not(test))]
 #[no_send]
+#[experimental = "Gc is currently based on reference-counting and will not collect cycles until \
+                  task annihilation. For now, cycles need to be broken manually by using `Rc<T>` \
+                  with a non-owning `Weak<T>` pointer. A tracing garbage collector is planned."]
 pub struct Gc<T> {
     priv ptr: @T
 }