summary refs log tree commit diff
path: root/src/libstd/rc.rs
AgeCommit message (Collapse)AuthorLines
2014-03-23use TotalEq for HashMapDaniel Micay-1/+8
Closes #5283
2014-03-22rustc: Remove all usage of manual deref()Alex Crichton-13/+12
Favor using '*' instead
2014-03-22std: Remove the get() method from RefCell wrappersAlex Crichton-1/+1
This method has been entirely obsoleted by autoderef, so there's no reason for its existence.
2014-03-22auto merge of #13052 : sfackler/rust/clean-refcell, r=alexcrichtonbors-4/+2
These are superfluous now that we have fixed rvalue lifetimes and Deref. I'd also like to kill off `get` and `set`, but that'll be a large change so I want to make sure that we actually want to do that first.
2014-03-21Rewrite rc::Rc using cell::CellEdward Wang-34/+65
Since `Arc` has been using `Atomic`, this closes 12625. Closes #12625.
2014-03-20Remove RefCell::{with, with_mut}Steven Fackler-4/+2
These are superfluous now that we have fixed rvalue lifetimes and Deref.
2014-03-20Make `Rc`, `Cell` and `RefCell` NoShareFlavio Percoco-7/+14
2014-03-13Remove Rc's borrow method to avoid conflicts with RefCell's borrow in ↵Eduard Burtescu-21/+15
Rc<RefCell<T>>.
2014-03-08Removed DeepClone. Issue #12698.Michael Darakananda-18/+1
2014-03-04Implement DerefImm for Rc and DerefImm/DerefMut for RefCell's Ref/RefMut.Eduard Burtescu-1/+9
2014-02-15std: clean up ptr a bitCorey Richardson-5/+5
2014-02-06Ensure an Rc isn't freed while running its own destructor.Huon Wilson-2/+27
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-01-31Introduce marker types for indicating variance and for opting outNiko Matsakis-9/+13
of builtin bounds. Fixes #10834. Fixes #11385. cc #5922.
2014-01-22Replace C types with Rust types in libstd, closes #7313Florian Hahn-2/+2
2014-01-14remove reference counting headers from ~Daniel Micay-0/+8
Unique pointers and vectors currently contain a reference counting header when containing a managed pointer. This `{ ref_count, type_desc, prev, next }` header is not necessary and not a sensible foundation for tracing. It adds needless complexity to library code and is responsible for breakage in places where the branch has been left out. The `borrow_offset` field can now be removed from `TyDesc` along with the associated handling in the compiler. Closes #9510 Closes #11533
2014-01-09port over the old tests to the new `Rc`Daniel Micay-1/+42
2014-01-09rename Strong -> Rc, replacing `rc` with `weak`Daniel Micay-96/+102
2014-01-09stop treating `Rc` cycles as unsafeDaniel Micay-45/+9
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-0/+1
2013-12-27std: uniform modules titles for docLuca Bruno-1/+1
This commit uniforms the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index. Signed-off-by: Luca Bruno <lucab@debian.org>
2013-11-26librustc: Fix merge fallout.Patrick Walton-22/+0
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-4/+26
2013-11-24Implement cmp traits for Rc<T> and add a ptr_eq method.Léo Testard-0/+55
2013-11-23Move mutable::Mut to cell::RefCellSteven Fackler-8/+8
2013-11-22Add Rc::from_mutSteven Fackler-0/+17
2013-11-22Change Mut::map to Mut::withSteven Fackler-4/+4
2013-11-22Move Rc tests away from CellSteven Fackler-7/+7
2013-11-22Remove RcMutSteven Fackler-237/+0
Rc<Mut<T>> should be used instead
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-2/+2
2013-11-07add `from_send` to Rc, since #9509 is fixedDaniel Micay-21/+24
2013-10-12rc: fix docstringDaniel Micay-1/+1
2013-10-11clean up the `Rc`/`RcMut` types and move to libstdDaniel Micay-0/+383
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-368/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-19Register snapshotsBrian Anderson-32/+0
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-1/+1
2013-05-15allow constructing Rc/RcMut from Const types tooDaniel Micay-42/+66
2013-05-15rc: fix testsDaniel Micay-15/+7
2013-05-15add a DeepClone traitDaniel Micay-4/+80
for deep copies through shared ownership boundaries
2013-05-12libsyntax: Remove `extern mod foo { ... }` from the language.Patrick Walton-2/+9
2013-05-10Stop using the '<->' operatorAlex Crichton-15/+5
2013-05-09Add intrinsic declaration where I missed themJames Miller-0/+2
2013-05-09Make staged versions of the functions that use uninitJames Miller-0/+33
2013-05-09Replace init() with uninit() where appropriateJames Miller-2/+2
2013-05-08fix incorrect region code based on the old 'selfDaniel Micay-6/+6
also removes unnecessary casts from the RcMut implementation
2013-05-07rc: remove the managed pointer workaroundDaniel Micay-6/+7
2013-05-06add task-local reference counted smart pointersDaniel Micay-0/+275
To provide a reference counted pointer type with deterministic destruction once managed boxes are switched over to a garbage collector. Unlike managed boxes, these can be moved instead of just copied/cloned which is helpful for avoiding reference counts.