about summary refs log tree commit diff
path: root/src/libcore/clone.rs
AgeCommit message (Collapse)AuthorLines
2014-09-22remove references to owned and managed pointers in clone docsSteve Klabnik-3/+1
Fixes #17445.
2014-06-29Extract tests from libcore to a separate crateSteven Fackler-60/+0
Libcore's test infrastructure is complicated by the fact that many lang items are defined in the crate. The current approach (realcore/realstd imports) is hacky and hard to work with (tests inside of core::cmp haven't been run for months!). Moving tests to a separate crate does mean that they can only test the public API of libcore, but I don't feel that that is too much of an issue. The only tests that I had to get rid of were some checking the various numeric formatters, but those are also exercised through normal format! calls in other tests.
2014-06-24core: Add stability attributes to CloneBrian Anderson-0/+4
The following are tagged 'unstable' - core::clone - Clone - Clone::clone - impl Clone for Arc - impl Clone for arc::Weak - impl Clone for Rc - impl Clone for rc::Weak - impl Clone for Vec - impl Clone for Cell - impl Clone for RefCell - impl Clone for small tuples The following are tagged 'experimental' - Clone::clone_from - may not provide enough utility - impls for various extern "Rust" fns - may not handle lifetimes correctly See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#clone
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-2/+2
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-1/+1
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-3/+4
2014-06-11rustc: Update how Gc<T> is recognizedAlex Crichton-6/+0
This commit uses the same trick as ~/Box to map Gc<T> to @T internally inside the compiler. This moves a number of implementations of traits to the `gc` module in the standard library. This removes functions such as `Gc::new`, `Gc::borrow`, and `Gc::ptr_eq` in favor of the more modern equivalents, `box(GC)`, `Deref`, and pointer equality. The Gc pointer itself should be much more useful now, and subsequent commits will move the compiler away from @T towards Gc<T> [breaking-change]
2014-05-15core: Update all tests for fmt movementAlex Crichton-1/+1
2014-05-13std: Move the owned module from core to stdAlex Crichton-17/+13
The compiler was updated to recognize that implementations for ty_uniq(..) are allowed if the Box lang item is located in the current crate. This enforces the idea that libcore cannot allocated, and moves all related trait implementations from libcore to libstd. This is a breaking change in that the AnyOwnExt trait has moved from the any module to the owned module. Any previous users of std::any::AnyOwnExt should now use std::owned::AnyOwnExt instead. This was done because the trait is intended for Box traits and only Box traits. [breaking-change]
2014-05-07Test fixes and rebase conflictsAlex Crichton-2/+3
2014-05-07core: Get coretest workingAlex Crichton-0/+2
This mostly involved frobbing imports between realstd, realcore, and the core being test. Some of the imports are a little counterintuitive, but it mainly focuses around libcore's types not implementing Show while libstd's types implement Show.
2014-05-07core: Bring clone tests up to date in styleAlex Crichton-36/+39
2014-05-07core: Inherit the clone moduleAlex Crichton-0/+171
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-184/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-20core: Update clone docsBrian Anderson-4/+6
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-4/+4
2013-05-16auto merge of #6509 : thestinger/rust/clone, r=nikomatsakisbors-0/+14
somewhat annoying to actually call thanks to auto-deref, but it does let `deriving(Clone)` work
2013-05-15add DeepClone impl for @T and @mut T with T: ConstDaniel Micay-11/+36
2013-05-15add a Clone impl for borrowed pointersDaniel Micay-0/+14
2013-05-15add a DeepClone traitDaniel Micay-7/+45
for deep copies through shared ownership boundaries
2013-05-15clone: clarify docstringDaniel Micay-2/+3
2013-04-08clone: managed boxes need to clone by shallow copyDaniel Micay-11/+19
Performing a deep copy isn't ever desired for a persistent data structure, and it requires a more complex implementation to do correctly. A deep copy needs to check for cycles to avoid an infinite loop.
2013-04-05Move tests inside clone.rs and fixed copyright headers.Jack Moffitt-1/+22
2013-04-05Implement Clone for @ and @mut types.Jack Moffitt-0/+10
The borrowck-borrow-from-expr-block test had to be updated. I'm not sure why it compiled before since ~int was already clonable.
2013-03-26core: Make sure every module at least has a one-line descriptionBrian Anderson-2/+13
2013-03-15impl Clone for ~T, ~[T], ~strBen Striegel-0/+5
2013-03-09core: implement Clone for primitive typesAndrew Paseltiner-0/+28
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-1/+1
rs=implflipping
2013-01-30librustc: Change `self` as a type to `Self` everywhere. r=brsonPatrick Walton-1/+1
2013-01-14Inlining methods/functions in core.gifnksm-0/+1
Also inlining some functions which take functions as arguments.
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-11-27core: Add Clone traitBrian Anderson-0/+10