about summary refs log tree commit diff
path: root/src/libcore/clone.rs
AgeCommit message (Collapse)AuthorLines
2016-03-22Add doc example to clone traitGuillaume Gomez-0/+23
2016-03-04End stdlib module summaries with a full stop.Steve Klabnik-1/+1
Fixes #9447
2015-11-16Make note about traits that can be derivedSteve Klabnik-0/+2
in their API docs Fixes #29711
2015-09-13Implement more traits for function pointersVadim Petrochenkov-42/+0
2015-06-17core: Split apart the global `core` featureAlex Crichton-5/+4
This commit shards the broad `core` feature of the libcore library into finer grained features. This split groups together similar APIs and enables tracking each API separately, giving a better sense of where each feature is within the stabilization process. A few minor APIs were deprecated along the way: * Iterator::reverse_in_place * marker::NoCopy
2015-04-13pluralize doc comment verbs and add missing periodsAndrew Paseltiner-7/+7
2015-04-10Rollup merge of #24215 - alexcrichton:stabilize-clone-from, r=aturonManish Goregaokar-2/+1
This method hasn't really changed since is inception, and it can often be a nice performance win for some situations. This method also imposes no burden on implementors or users of `Clone` as it's just a default method on the side.
2015-04-08std: Stabilize Clone::clone_fromAlex Crichton-2/+1
This method hasn't really changed since is inception, and it can often be a nice performance win for some situations. This method also imposes no burden on implementors or users of `Clone` as it's just a default method on the side.
2015-04-07Add Clone impls for extern "C" and unsafe fnsKevin Ballard-0/+21
We only implemented Clone on `extern "Rust" fn`s (for up to 8 parameters). This didn't cover `extern "C"` or `unsafe` (or `unsafe extern "C"`) `fn`s, but there's no reason why they shouldn't be cloneable as well. The new impls are marked unstable because the existing impl for `extern "Rust" fn`s is. Fixes #24161.
2015-03-24An example for cloneSteve Klabnik-0/+8
2015-02-14core: Use int/isize in Clone boilerplateBrian Anderson-2/+2
2015-01-23grandfathered -> rust1Brian Anderson-5/+5
2015-01-23Set unstable feature names appropriatelyBrian Anderson-2/+2
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-21Remove 'since' from unstable attributesBrian Anderson-2/+2
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-7/+9
2015-01-08Improvements to feature stagingBrian Anderson-1/+1
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-07markers -> markerNick Cameron-1/+1
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-1/+1
[breaking-change]
2015-01-06FalloutNick Cameron-1/+1
2015-01-02Fix fallout from change, adding explicit `Sized` annotations where necessary.Niko Matsakis-1/+1
2014-12-24Fix a typoSimonas Kazlauskas-1/+1
2014-12-20Stabilize cloneAaron Turon-3/+6
This patch marks `clone` stable, as well as the `Clone` trait, but leaves `clone_from` unstable. The latter will be decided by the beta. The patch also marks most manual implementations of `Clone` as stable, except where the APIs are otherwise deprecated or where there is uncertainty about providing `Clone`.
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-28/+28
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-11-26/*! -> //!Steve Klabnik-12/+10
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-17DSTify `impl Clone for &T`Jorge Aparicio-13/+3
Closes #19037
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