Jorge Aparicio
d5d7e6565a
for x in xs.iter() -> for x in &xs
2015-02-02 13:40:18 -05:00
Jorge Aparicio
134cf707df
register snapshots
2015-02-02 13:38:32 -05:00
Alex Crichton
188d7c0bc3
rollup merge of #21631 : tbu-/isize_police
...
Conflicts:
src/libcoretest/iter.rs
2015-01-30 13:27:02 -08:00
Jorge Aparicio
f9865eac18
fix fallout
2015-01-30 10:37:44 -05:00
Tobias Bucher
7f64fe4e27
Remove all i suffixes
2015-01-30 04:38:54 +01:00
Nick Cameron
c64a96d385
Remove FullRange from the prelude etc.
2015-01-30 12:00:20 +13:00
Jorge Aparicio
3cc191e58a
remove unused imports
2015-01-29 07:49:01 -05:00
Jorge Aparicio
94d04e684c
fix inference fallout
2015-01-29 07:49:01 -05:00
Jorge Aparicio
efc97a51ff
convert remaining range(a, b) to a..b
2015-01-29 07:49:01 -05:00
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
Jorge Aparicio
c300d681bd
range(a, b).foo() -> (a..b).foo()
...
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-29 07:46:44 -05:00
bors
bedd8108dc
Auto merge of #21680 - japaric:slice, r=alexcrichton
...
Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.
2015-01-29 05:47:21 +00:00
Manish Goregaokar
c709ed2faf
Merge remote-tracking branch 'origin/master' into rollup
...
Conflicts:
src/libcollections/slice.rs
src/libcore/nonzero.rs
src/libcore/ops.rs
2015-01-28 23:31:03 +05:30
Jorge Aparicio
bce81e2464
cleanup: s/v.slice*()/&v[a..b]/g + remove redundant as_slice() calls
2015-01-27 09:03:06 -05:00
Carol Nichols
ebd2d8db76
Correct a typo in a deprecation warning
2015-01-26 21:09:50 -05:00
Carol Nichols
b8b52d61f3
Add examples to documentation of SliceExt methods
2015-01-26 21:09:50 -05: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
Brian Anderson
b44ee371b8
grandfathered -> rust1
2015-01-23 21:48:20 -08:00
Brian Anderson
9758c488a9
Deprecated attributes don't take 'feature' names and are paired with stable/unstable
...
Conflicts:
src/libcore/atomic.rs
src/libcore/finally.rs
src/test/auxiliary/inherited_stability.rs
src/test/auxiliary/lint_stability.rs
2015-01-23 15:50:03 -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
Steve Klabnik
acd044c255
Rollup merge of #21484 - steveklabnik:connect_docs, r=alexcrichton
2015-01-22 18:10:00 -05:00
Brian Anderson
41278c5441
Remove 'since' from unstable attributes
2015-01-21 19:25:55 -08:00
Brian Anderson
94ca8a3610
Add 'feature' and 'since' to stability attributes
2015-01-21 16:16:18 -08:00
Steve Klabnik
22d2387db2
add doc examples for connect/concat
2015-01-21 17:56:33 -05: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
87c3ee861e
rollup merge of #21457 : alexcrichton/issue-21436
...
Conflicts:
src/liballoc/boxed.rs
src/librustc/middle/traits/error_reporting.rs
src/libstd/sync/mpsc/mod.rs
2015-01-21 09:20:35 -08:00
Alex Crichton
2e9adab528
rollup merge of #21053 : apasel422/exact
2015-01-21 09:13:38 -08:00
Aaron Turon
a506d4cbfe
Fallout from stabilization.
2015-01-21 08:11:07 -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
Alex Crichton
3cb9fa26ef
std: Rename Show/String to Debug/Display
...
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-20 22:36:13 -08:00
Andrew Paseltiner
2cc7feb4f6
implement ExactSizeIterator for slice::{Chunks,ChunksMut}
2015-01-20 22:44:22 -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
Alex Crichton
0dc48b47a8
Test fixes and rebase conflicts
2015-01-07 19:27:27 -08:00
Jorge Aparicio
517f1cc63c
use slicing sugar
2015-01-07 17:35:56 -05:00
bors
c0216c8945
Merge pull request #20674 from jbcrail/fix-misspelled-comments
...
Fix misspelled comments.
Reviewed-by: steveklabnik
2015-01-07 15:35:30 +00:00
Joseph Crail
e3b7fedc20
Fix misspelled comments.
...
I cleaned up comments prior to the 1.0 alpha release.
2015-01-06 20:53:18 -05: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
Alex Crichton
5c3ddcb15d
rollup merge of #20481 : seanmonstar/fmt-show-string
...
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-06 15:22:24 -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
Sean McArthur
44440e5c18
core: split into fmt::Show and fmt::String
...
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-06 14:49:42 -08:00
Nick Cameron
f7ff37e4c5
Replace full slice notation with index calls
2015-01-07 10:46:33 +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
Alex Crichton
ee9921aaed
Revert "Remove i suffix in docs"
...
This reverts commit f031671c6e .
Conflicts:
src/libcollections/slice.rs
src/libcore/iter.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/rwlock.rs
2015-01-05 19:08:37 -08:00
Alex Crichton
7975fd9cee
rollup merge of #20482 : kmcallister/macro-reform
...
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-05 19:01:17 -08: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