about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-15 11:21:45 -0800
committerbors <bors@rust-lang.org>2014-01-15 11:21:45 -0800
commitf60d937dd9046a522e1b50ae666e5dd6c0a38de2 (patch)
tree4c82ece1987d190e5081d034377ded29a9e9c68e /src/libstd
parent7cb2aa24293cb1a68eb64bd95329b73446b0960c (diff)
parentf40d5b1050fc727170d79d42ef6cbf0c6b826bfd (diff)
downloadrust-f60d937dd9046a522e1b50ae666e5dd6c0a38de2.tar.gz
rust-f60d937dd9046a522e1b50ae666e5dd6c0a38de2.zip
auto merge of #11543 : thestinger/rust/gc, r=cmr
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/libstd')
-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
 }