From f40d5b1050fc727170d79d42ef6cbf0c6b826bfd Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 14 Jan 2014 05:17:19 -0500 Subject: [PATCH] add an experimental tag for Gc 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. --- src/libstd/gc.rs | 5 +++++ 1 file changed, 5 insertions(+) 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` 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` \ + with a non-owning `Weak` pointer. A tracing garbage collector is planned."] pub struct Gc { priv ptr: @T }