rust/src/libstd
Huon Wilson da45340ab8 Ensure an Rc isn't freed while running its own destructor.
A weak pointer inside itself will have its destructor run when the last
strong pointer to that data disappears, so we need to make sure that the
Weak and Rc destructors don't duplicate work (i.e. freeing).

By making the Rcs effectively take a weak pointer, we ensure that no
Weak destructor will free the pointer while still ensuring that Weak
pointers can't be upgraded to strong ones as the destructors run.

This approach of starting weak at 1 is what libstdc++ does.

Fixes #12046.
2014-02-06 09:05:59 +11:00
..
comm std: Remove try_send_deferred plus all fallout 2014-02-03 12:05:16 -08:00
fmt Register new snapshots 2014-02-04 00:06:08 -08:00
io Fixing remaining warnings and errors throughout 2014-02-03 10:39:23 -08:00
num auto merge of #11930 : bjz/rust/next_power_of_two, r=huonw 2014-02-01 04:11:21 -08:00
path Fixing remaining warnings and errors throughout 2014-02-03 10:39:23 -08:00
rand std: Remove io::io_error 2014-02-03 09:32:33 -08:00
rt std: Remove try_send_deferred plus all fallout 2014-02-03 12:05:16 -08:00
sync auto merge of #11230 : csherratt/rust/cow, r=alexcrichton 2014-02-04 14:41:36 -08:00
unstable Register new snapshots 2014-02-04 00:06:08 -08:00
any.rs Fix minor doc typos 2014-01-31 21:43:07 -08:00
ascii.rs Fix minor doc typos 2014-01-31 21:43:07 -08:00
bool.rs Add operator trait constraints to std::num::{Zero, One} and document their appropriate use 2014-01-20 18:09:46 +11:00
c_str.rs impl Eq for CString 2014-02-01 18:24:44 -05:00
cast.rs 'borrowed pointer' -> 'reference' 2014-01-07 18:49:13 -08:00
cell.rs Replace NonCopyable usage with NoPod 2014-02-04 00:15:27 +01:00
char.rs Add operator trait constraints to std::num::{Zero, One} and document their appropriate use 2014-01-20 18:09:46 +11:00
cleanup.rs Removed all instances of XXX in preparation for relaxing of FIXME rule 2014-01-26 14:42:53 -05:00
clone.rs 'borrowed pointer' -> 'reference' 2014-01-07 18:49:13 -08:00
cmp.rs Remove ApproxEq and assert_approx_eq! 2014-01-09 15:41:46 +11:00
condition.rs Remove re-exports of std::io::stdio::{print, println} in the prelude. 2014-01-11 10:46:00 +11:00
container.rs std: uniform modules titles for doc 2013-12-27 09:49:11 +01:00
default.rs libstd: Remove all support code related to @mut 2014-01-03 14:02:00 -08:00
from_str.rs std: uniform modules titles for doc 2013-12-27 09:49:11 +01:00
gc.rs Fix @str removal tests. 2014-02-02 02:58:57 +11:00
hash.rs std: Remove io::io_error 2014-02-03 09:32:33 -08:00
hashmap.rs Rename reserve to reserve_exact and reserve_at_least to reserve 2014-02-04 12:33:41 +11:00
iter.rs auto merge of #11789 : pongad/rust/master, r=kballard 2014-01-31 23:31:28 -08:00
kinds.rs Introduce marker types for indicating variance and for opting out 2014-01-31 21:18:48 -05:00
lib.rs std,extra: remove use of & support for @[]. 2014-02-02 02:59:03 +11:00
libc.rs Add libc::consts::os::posix01::PTHREAD_STACK_MIN 2014-01-31 13:47:25 +01:00
local_data.rs Removing do keyword from libstd and librustc 2014-01-29 09:15:41 -05:00
logging.rs std: Remove io::io_error 2014-02-03 09:32:33 -08:00
macros.rs std: Remove io::io_error 2014-02-03 09:32:33 -08:00
managed.rs remove the concept of managed-unique from libstd 2014-01-15 08:22:59 -05:00
mem.rs Cleaned, documented, wrote tests for up std::bool 2013-10-24 17:21:39 +02:00
ops.rs Remove re-exports of std::io::stdio::{print, println} in the prelude. 2014-01-11 10:46:00 +11:00
option.rs Replace NonCopyable usage with NoPod 2014-02-04 00:15:27 +01:00
os.rs Fixing remaining warnings and errors throughout 2014-02-03 10:39:23 -08:00
owned.rs librustc: Implement placement box for GC and unique pointers. 2014-01-09 16:05:34 -08:00
prelude.rs auto merge of #11672 : bjz/rust/remove-times, r=brson 2014-01-29 20:06:36 -08:00
ptr.rs Remove unnecessary parentheses. 2014-01-21 22:00:18 +11:00
rc.rs Ensure an Rc isn't freed while running its own destructor. 2014-02-06 09:05:59 +11:00
reference.rs Remove seldom-used std::reference functions. 2014-01-29 20:31:03 -05:00
reflect.rs Register new snapshots 2014-02-04 00:06:08 -08:00
repr.rs Register new snapshots 2014-02-04 00:06:08 -08:00
result.rs std: Remove io::io_error 2014-02-03 09:32:33 -08:00
rtdeps.rs Convert some C functions to rust functions 2013-12-30 14:35:55 -08:00
run.rs std: Fix tests with io_error usage 2014-02-03 09:32:34 -08:00
send_str.rs libextra: Remove @str from all the libraries 2014-02-02 01:44:50 +11:00
str.rs auto merge of #11951 : dmanescu/rust/reserve-rename, r=huonw 2014-02-04 04:31:34 -08:00
task.rs Replace NonCopyable usage with NoPod 2014-02-04 00:15:27 +01:00
to_bytes.rs std: Remove io::io_error 2014-02-03 09:32:33 -08:00
to_str.rs std,extra: remove use of & support for @[]. 2014-02-02 02:59:03 +11:00
trie.rs Uppercase numeric constants 2014-01-25 21:38:25 +13:00
tuple.rs Rename CopyableTuple to CloneableTuple 2014-01-28 23:51:52 +01:00
unicode.rs Remove dead codes 2013-12-08 02:55:28 -05:00
unit.rs Add operator trait constraints to std::num::{Zero, One} and document their appropriate use 2014-01-20 18:09:46 +11:00
util.rs Replace NonCopyable usage with NoPod 2014-02-04 00:15:27 +01:00
vec_ng.rs add new vector representation as a library 2014-01-22 23:13:57 -05:00
vec.rs auto merge of #11951 : dmanescu/rust/reserve-rename, r=huonw 2014-02-04 04:31:34 -08:00