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.
This commit is contained in:
bors 2014-01-15 11:21:45 -08:00
commit f60d937dd9

View File

@ -16,6 +16,8 @@
*/ */
#[allow(experimental)];
use kinds::Send; use kinds::Send;
use clone::{Clone, DeepClone}; use clone::{Clone, DeepClone};
use managed; use managed;
@ -24,6 +26,9 @@
#[lang="gc"] #[lang="gc"]
#[cfg(not(test))] #[cfg(not(test))]
#[no_send] #[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> { pub struct Gc<T> {
priv ptr: @T priv ptr: @T
} }