Jorge Aparicio
7d661af9c8
for x in range(a, b)
-> for x in a..b
...
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29 07:47:37 -05:00
Brian Anderson
d179ba3b8e
Merge remote-tracking branch 'rust-lang/master'
...
Conflicts:
src/libcore/cmp.rs
src/libcore/fmt/mod.rs
src/libcore/iter.rs
src/libcore/marker.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/result.rs
src/libcore/str/mod.rs
src/librustc/lint/builtin.rs
src/librustc/lint/context.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/poison.rs
2015-01-25 22:14:06 -08:00
Brian Anderson
63fcbcf3ce
Merge remote-tracking branch 'rust-lang/master'
...
Conflicts:
mk/tests.mk
src/liballoc/arc.rs
src/liballoc/boxed.rs
src/liballoc/rc.rs
src/libcollections/bit.rs
src/libcollections/btree/map.rs
src/libcollections/btree/set.rs
src/libcollections/dlist.rs
src/libcollections/ring_buf.rs
src/libcollections/slice.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/libcollections/vec.rs
src/libcollections/vec_map.rs
src/libcore/any.rs
src/libcore/array.rs
src/libcore/borrow.rs
src/libcore/error.rs
src/libcore/fmt/mod.rs
src/libcore/iter.rs
src/libcore/marker.rs
src/libcore/ops.rs
src/libcore/result.rs
src/libcore/slice.rs
src/libcore/str/mod.rs
src/libregex/lib.rs
src/libregex/re.rs
src/librustc/lint/builtin.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/mutex.rs
src/libstd/sync/poison.rs
src/libstd/sync/rwlock.rs
src/libsyntax/feature_gate.rs
src/libsyntax/test.rs
2015-01-25 01:20:55 -08:00
Alfie John
f67e7470b3
Moving away from deprecated i/u suffixes in libcore
2015-01-25 00:17:41 +00:00
Brian Anderson
b44ee371b8
grandfathered -> rust1
2015-01-23 21:48:20 -08:00
Brian Anderson
cd6d9eab5d
Set unstable feature names appropriately
...
* `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-23 13:28:40 -08:00
Brian Anderson
41278c5441
Remove 'since' from unstable attributes
2015-01-21 19:25:55 -08:00
Brian Anderson
7b73ec4698
Tie stability attributes to feature gates
2015-01-21 16:16:21 -08:00
Brian Anderson
94ca8a3610
Add 'feature' and 'since' to stability attributes
2015-01-21 16:16:18 -08:00
Alex Crichton
886c6f3534
rollup merge of #21258 : aturon/stab-3-index
...
Conflicts:
src/libcore/ops.rs
src/librustc_typeck/astconv.rs
src/libstd/io/mem.rs
src/libsyntax/parse/lexer/mod.rs
2015-01-21 11:53:49 -08:00
Alex Crichton
1646707c6e
rollup merge of #21396 : japaric/no-parens-in-range
...
Conflicts:
src/libsyntax/parse/lexer/comments.rs
2015-01-21 09:15:15 -08:00
Alex Crichton
2e9adab528
rollup merge of #21053 : apasel422/exact
2015-01-21 09:13:38 -08:00
Aaron Turon
092ba6a856
Deprecate slicing methods in favor of notation
...
This commit deprecates `slice`, `slice_from`, `slice_to` and their
mutable variants in favor of slice notation.
The `as_slice` methods are left intact, for now.
[breaking-change]
2015-01-21 07:45:45 -08:00
Andrew Paseltiner
2cc7feb4f6
implement ExactSizeIterator
for slice::{Chunks,ChunksMut}
2015-01-20 22:44:22 -05:00
Jorge Aparicio
49684850be
remove unnecessary parentheses from range notation
2015-01-19 12:24:43 -05:00
we
812ce6c190
Remove unnecessary explicit conversions to *const T
2015-01-17 07:34:10 +03:00
Jorge Aparicio
c1d48a8508
cleanup: &foo[0..a]
-> &foo[..a]
2015-01-12 17:59:37 -05:00
Brian Anderson
1f70acbf4c
Improvements to feature staging
...
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-08 03:07:23 -08:00
Jorge Aparicio
517f1cc63c
use slicing sugar
2015-01-07 17:35:56 -05:00
Alex Crichton
56a9e2fcd5
Test fixes and rebase conflicts
2015-01-06 16:10:37 -08:00
Alex Crichton
34a63d3364
rollup merge of #20656 : japaric/at-clean
2015-01-06 15:41:13 -08:00
Alex Crichton
771fe9026a
rollup merge of #20607 : nrc/kinds
...
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-06 15:34:10 -08:00
Nick Cameron
9f07d055f7
markers -> marker
2015-01-07 12:10:31 +13:00
Nick Cameron
0c7f7a5fb8
fallout
2015-01-07 12:02:52 +13:00
Nick Cameron
f7ff37e4c5
Replace full slice notation with index calls
2015-01-07 10:46:33 +13:00
Nick Cameron
918255ef8c
Impls using the new scheme for slicing
2015-01-07 10:24:19 +13:00
Nick Cameron
503709708c
Change std::kinds
to std::markers
; flatten std::kinds::marker
...
[breaking-change]
2015-01-07 09:45:28 +13:00
Jorge Aparicio
ec133fed40
cleanup: use short AT notation (Ty::Item
instead of <Ty as Trait>::Item
)
2015-01-06 11:23:18 -05:00
Alex Crichton
384e218789
Merge remote-tracking branch 'nrc/sized-2' into rollup
...
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-05 18:55:41 -08:00
Alex Crichton
afbce050ca
rollup merge of #20556 : japaric/no-for-sized
...
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-05 18:47:45 -08:00
Alex Crichton
2e883a5f53
rollup merge of #20560 : aturon/stab-2-iter-ops-slice
...
Conflicts:
src/libcollections/slice.rs
src/libcore/iter.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/rwlock.rs
2015-01-05 18:41:20 -08:00
Nick Cameron
e0684e8769
Fallout
2015-01-06 14:20:48 +13:00
Aaron Turon
c6f4a03d12
Stabilization of impls and fallout from stabilization
2015-01-05 14:26:04 -08:00
Jorge Aparicio
a291a80fbe
register snapshot
2015-01-05 17:22:11 -05:00
Aaron Turon
121f6c6673
Final alpha stabilization of std::slice
...
Marks as `#[stable]`:
* Various iterator structs for stable methods, e.g. `Chunks` and
`Windows`.
* The `SliceExt` trait itself.
2015-01-05 14:08:21 -08:00
Jorge Aparicio
c26f5801f5
remove unused Sized
imports
2015-01-05 14:56:49 -05:00
Jorge Aparicio
774588fd9d
sed -i -s 's/ for Sized?//g' **/*.rs
2015-01-05 14:56:49 -05:00
Alex Crichton
7d8d06f86b
Remove deprecated functionality
...
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-03 23:43:57 -08:00
Jorge Aparicio
351409a622
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
2015-01-03 22:54:18 -05:00
Jorge Aparicio
8c5bb80d9b
sed -i -s 's/\bmod}/self}/g' **/*.rs
2015-01-03 22:42:37 -05:00
Jorge Aparicio
234dc4d4dd
core: use assoc types in Index[Mut]
2015-01-03 16:30:48 -05:00
Jorge Aparicio
41df05dd0e
core: use assoc types in Iterator et al
2015-01-03 09:34:04 -05:00
Jorge Aparicio
cc5ecaf765
merge *SliceExt
traits, use assoc types in SliceExt
, Raw[Mut]Ptr
2015-01-02 12:07:04 -05:00
Alex Crichton
67d13883f8
rollup merge of #20061 : aturon/stab-2-vec-slice
...
Conflicts:
src/libcollections/slice.rs
src/libcollections/vec.rs
src/libstd/sys/windows/os.rs
2014-12-30 18:51:51 -08:00
Aaron Turon
6abfac083f
Fallout from stabilization
2014-12-30 17:06:08 -08:00
Aaron Turon
b94bcbf56e
Stabilize cmp
...
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-30 14:44:26 -08:00
Aaron Turon
4f863a338e
Second pass stabilization: slice
...
This commit takes a second pass through the `slice` module to
stabilize its API. The changes are as follows:
**Stable**:
* `as_mut_slice`
* `as_ptr`, `as_mut_ptr`
* `binary_search_by` (was: `binary_search`)
* `binary_search` (was: `binary_search_elem`)
* `chunks`, `chunks_mut`
* `contains`
* `ends_with`
* `first`, `first_mut` (was: `head`)
* `get_unchecked`, `get_unchecked_mut` (was: `unsafe_get`)
* `get`
* `is_empty`
* `iter`, `iter_mut`
* `len`
* `reverse`
* `sort_by`
* `sort`
* `split_at`, `split_at_mut`
* `split_mut`, `splitn_mut`, `rsplitn_mut`
* `split`, `splitn`, `rsplitn`
* `starts_with`
* `swap`
* `to_vec`
* `windows`
**Deprecated**:
* `head`, `head_mut` (renamed as above)
* `unsafe_get`, `unsafe_mut` (renamed as above)
* `binary_search_elem` (renamed as above)
* `partitioned`, deprecated in favor of a new, more
general iterator consumer called `partition`.
* `BinarySearchResult`, deprecated in favor of `Result<uint, uint>`
[breaking-change]
2014-12-30 12:02:22 -08:00
Alex Crichton
dbc8440821
rollup merge of #20160 : nick29581/ranges2
...
The first six commits are from an earlier PR (#19858 ) and have already been reviewed. This PR makes an awful hack in the compiler to accommodate slices both natively and in the index a range form. After a snapshot we can hopefully add the new Index impls and then we can remove these awful hacks.
r? @nikomatsakis (or anyone who knows the compiler, really)
2014-12-29 16:35:53 -08:00
Nick Cameron
3bf405682d
Fallout from mut slices
2014-12-30 13:06:25 +13:00
Nick Cameron
4e2afb0052
Remove ExprSlice by hacking the compiler
...
[breaking-change]
The `mut` in slices is now redundant. Mutability is 'inferred' from position. This means that if mutability is only obvious from the type, you will need to use explicit calls to the slicing methods.
2014-12-30 13:06:25 +13:00