about summary refs log tree commit diff
path: root/src/libcollections
AgeCommit message (Collapse)AuthorLines
2015-01-06rollup merge of #20593: nikomatsakis/unused-tps-in-implAlex Crichton-1/+3
Conflicts: src/libcollections/lib.rs src/librustc/lib.rs src/libserialize/lib.rs src/libstd/lib.rs
2015-01-06rollup merge of #20653: alexcrichton/entry-unstableAlex Crichton-28/+26
There's been some debate over the precise form that these APIs should take, and they've undergone some changes recently, so these APIs are going to be left unstable for now to be fleshed out during the next release cycle.
2015-01-06Register new snapshotsAlex Crichton-42/+3
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-34/+73
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-07markers -> markerNick Cameron-13/+13
2015-01-07falloutNick Cameron-50/+56
2015-01-06Fallout from stabilizationAaron Turon-1/+1
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-34/+73
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-06Fix fallout in libs. For the most part I just tagged impls as ↵Niko Matsakis-1/+3
`#[old_impl_check]`.
2015-01-07Replace full slice notation with index callsNick Cameron-109/+103
2015-01-07Impls using the new scheme for slicingNick Cameron-26/+53
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-12/+14
[breaking-change]
2015-01-06std: Revert stability of Entry-based APIsAlex Crichton-10/+10
There's been some debate over the precise form that these APIs should take, and they've undergone some changes recently, so these APIs are going to be left unstable for now to be fleshed out during the next release cycle.
2015-01-06[breaking change] Revert Entry behaviour to take keys by value.Dylan Ede-18/+16
2015-01-06cleanup: use short AT notation (`Ty::Item` instead of `<Ty as Trait>::Item`)Jorge Aparicio-2/+2
2015-01-05More test fixes!Alex Crichton-0/+1
2015-01-05Revert "Remove i suffix in docs"Alex Crichton-553/+419
This reverts commit f031671c6ea79391eeb3e1ad8f06fe0e436103fb. Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-13/+51
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05Merge remote-tracking branch 'nrc/sized-2' into rollupAlex Crichton-16/+16
Conflicts: src/liballoc/boxed.rs src/libcollections/btree/map.rs src/libcollections/slice.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/libstd/collections/hash/map.rs src/libsyntax/parse/obsolete.rs src/test/compile-fail/unboxed-closure-sugar-default.rs src/test/compile-fail/unboxed-closure-sugar-equiv.rs src/test/compile-fail/unboxed-closure-sugar-lifetime-elision.rs src/test/compile-fail/unboxed-closure-sugar-region.rs src/test/compile-fail/unsized3.rs src/test/run-pass/associated-types-conditional-dispatch.rs
2015-01-05rollup merge of #20556: japaric/no-for-sizedAlex Crichton-3/+3
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/test/compile-fail/issue-19009.rs
2015-01-05rollup merge of #20565: alexcrichton/missing-stabilityAlex Crichton-0/+3
Conflicts: src/libstd/sync/mpsc/mod.rs
2015-01-05rollup merge of #20560: aturon/stab-2-iter-ops-sliceAlex Crichton-15/+52
Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
2015-01-05rollup merge of #20507: alexcrichton/issue-20444Alex Crichton-42/+0
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-05rollup merge of #20434: steveklabnik/five_eyeAlex Crichton-427/+555
This takes advantage of integer fallback to stop recomending `i` so much.
2015-01-05rollup merge of #20197: pczarn/ring_buf-collections-reformAlex Crichton-22/+307
Part of collections reform part 1 and 2, #18424 and #19986 * shrink_to_fit * swap_back_remove * swap_front_remove * truncate * resize
2015-01-05Modernize macro_rules! invocationsKeegan McAllister-8/+12
macro_rules! is like an item that defines a macro. Other items don't have a trailing semicolon, or use a paren-delimited body. If there's an argument for matching the invocation syntax, e.g. parentheses for an expr macro, then I think that applies more strongly to the *inner* delimiters on the LHS, wrapping the individual argument patterns.
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-3/+22
2015-01-06FalloutNick Cameron-18/+18
2015-01-05Remove i suffix in docsSteve Klabnik-427/+555
2015-01-05Stabilization of impls and fallout from stabilizationAaron Turon-10/+31
2015-01-05register snapshotJorge Aparicio-104/+0
2015-01-05Stabilize collection modulesAaron Turon-0/+9
The earlier collections stabilization did not cover the modules themselves. This commit marks as stable those modules whose types have been stabilized.
2015-01-05Final alpha stabilization of std::sliceAaron Turon-2/+4
Marks as `#[stable]`: * Various iterator structs for stable methods, e.g. `Chunks` and `Windows`. * The `SliceExt` trait itself.
2015-01-05Rename macro_escape to macro_useKeegan McAllister-1/+2
In the future we want to support #[macro_use(foo, bar)] mod macros; but it's not an essential part of macro reform. Reserve the syntax for now.
2015-01-05Stop using macro_escape as an inner attributeKeegan McAllister-2/+1
In preparation for the rename.
2015-01-05Use $crate and macro reexport to reduce duplicated codeKeegan McAllister-0/+15
Many of libstd's macros are now re-exported from libcore and libcollections. Their libstd definitions have moved to a macros_stage0 module and can disappear after the next snapshot. Where the two crates had already diverged, I took the libstd versions as they're generally newer and better-tested. See e.g. d3c831b, which was a fix to libstd's assert_eq!() that didn't make it into libcore's. Fixes #16806.
2015-01-05remove unused `Sized` importsJorge Aparicio-1/+0
2015-01-05sed -i -s 's/ for Sized?//g' **/*.rsJorge Aparicio-3/+3
2015-01-05std: Redesign c_str and c_vecAlex Crichton-42/+0
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-05Implement a few methods for RingBufPiotr Czarnecki-22/+307
* shrink_to_fit * swap_back_remove * swap_front_remove * truncate * resize
2015-01-04std: Fixup some missing stabilization on strAlex Crichton-0/+3
* The `str` module itself is stable. * The `StrExt` trait is stable (and impls). * The `Utf8Error` type is unstable. * The `from_utf8` function is stable * Some iterators are now stable: * `Chars` * `CharIndices` * The `MatchIndices` iterator is now unstable * The public `traits` module is no longer public.
2015-01-05auto merge of #20395 : huonw/rust/char-stab-2, r=aturonbors-3/+2
cc #19260 The casing transformations are left unstable (it is highly likely to be better to adopt the proper non-1-to-1 case mappings, per #20333) as are `is_xid_*`. I've got a little todo list in the last commit of things I thought about/was told about that I haven't yet handled (I'd also like some feedback).
2015-01-05Merge `UnicodeChar` and `CharExt`.Huon Wilson-2/+1
This "reexports" all the functionality of `core::char::CharExt` as methods on `unicode::u_char::UnicodeChar` (renamed to `CharExt`). Imports may need to be updated (one now just imports `unicode::CharExt`, or `std::char::CharExt` rather than two traits from either), so this is a [breaking-change]
2015-01-05Rename `core::char::Char` to `CharExt` to match prelude guidelines.Huon Wilson-2/+2
Imports may need to be updated so this is a [breaking-change]
2015-01-04[breaking change] Update entry API as part of RFC 509.Ben Foppa-26/+52
2015-01-03Remove deprecated functionalityAlex Crichton-1428/+197
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-36/+36
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-16/+16
2015-01-03collections: fix falloutJorge Aparicio-0/+121
2015-01-03use assoc types in binop traitsJorge Aparicio-10/+30