about summary refs log tree commit diff
path: root/src/libcore/array.rs
AgeCommit message (Collapse)AuthorLines
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-3/+3
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-19impl Hash for arraysJorge Aparicio-0/+7
closes #21402 cc #15294
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-07use slicing sugarJorge Aparicio-14/+14
2015-01-06rollup merge of #20607: nrc/kindsAlex Crichton-1/+1
Conflicts: src/libcore/array.rs src/libcore/cell.rs src/libcore/prelude.rs src/libstd/path/posix.rs src/libstd/prelude/v1.rs src/test/compile-fail/dst-sized-trait-param.rs
2015-01-07markers -> markerNick Cameron-1/+1
2015-01-07falloutNick Cameron-4/+12
2015-01-07Replace full slice notation with index callsNick Cameron-14/+14
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-1/+1
[breaking-change]
2015-01-02core: use assoc types in `Deref[Mut]`Jorge Aparicio-2/+2
2015-01-02More falloutNick Cameron-19/+19
2014-12-30Stabilize cmpAaron Turon-4/+6
This patch marks `PartialEq`, `Eq`, `PartialOrd`, and `Ord` as `#[stable]`, as well as the majorify of manual implementaitons of these traits. The traits match the [reform RFC](https://github.com/rust-lang/rfcs/pull/439). Along the way, two changes are made: * The recently-added type parameters for `Ord` and `Eq` are removed. These were mistakenly added while adding them to `PartialOrd` and `PartialEq`, but they don't make sense given the laws that are required for (and use cases for) `Ord` and `Eq`. * More explicit laws are added for `PartialEq` and `PartialOrd`, connecting them to their associated mathematical concepts. In the future, many of the impls should be generalized; see since generalizing later is not a breaking change. [breaking-change]
2014-12-20Stabilize cloneAaron Turon-2/+1
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-03Overload the `==` operatorJorge Aparicio-3/+24
- String == &str == CowString - Vec == &[T] == &mut [T] == [T, ..N] == CowVec - InternedString == &str
2014-11-14Add `Show` and `Clone` trait to arraysTobias Bucher-8/+22
Due to not being able to parametrize over array sizes, `Clone` is only implemented for element types that are `Copy`able.
2014-11-05Remove incorrect doc annotation, mark experimental since we haven't ↵Niko Matsakis-5/+1
discussed in an API meeting
2014-11-05Add impls of the comparison operators for fixed-length arrays of lengths ↵Niko Matsakis-0/+87
0...32 and repair various cases where slices and fixed-length arrays were being compared.