Skip to content

Commit f60d937

Browse files
committed
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.
2 parents 7cb2aa2 + f40d5b1 commit f60d937

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libstd/gc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ collector is task-local so `Gc<T>` is not sendable.
1616
1717
*/
1818

19+
#[allow(experimental)];
20+
1921
use kinds::Send;
2022
use clone::{Clone, DeepClone};
2123
use managed;
@@ -24,6 +26,9 @@ use managed;
2426
#[lang="gc"]
2527
#[cfg(not(test))]
2628
#[no_send]
29+
#[experimental = "Gc is currently based on reference-counting and will not collect cycles until \
30+
task annihilation. For now, cycles need to be broken manually by using `Rc<T>` \
31+
with a non-owning `Weak<T>` pointer. A tracing garbage collector is planned."]
2732
pub struct Gc<T> {
2833
priv ptr: @T
2934
}

0 commit comments

Comments
 (0)