Jorge Aparicio
2d76c94dd0
s/while let/for/g now that #21245 has been fixed
2015-01-30 10:37:45 -05:00
Jorge Aparicio
c013a018b8
add test for #21655
...
closes #21655
2015-01-30 10:37:44 -05:00
Jorge Aparicio
3a62590be2
add test for #20605
...
closes #20605
closes #20989 (duplicate)
closes #21379 (duplicate)
2015-01-30 10:37:44 -05:00
Jorge Aparicio
cb896a6e5f
fix recursive call
2015-01-30 10:37:44 -05:00
Jorge Aparicio
d4b3e7f09c
remove the Iterator
lang item
2015-01-30 10:37:44 -05:00
Jorge Aparicio
bfaf4227b8
smoke out remaining bugs
2015-01-30 10:37:44 -05:00
Jorge Aparicio
ed82b5a70e
remove Copy impls from iterators
2015-01-30 10:37:44 -05:00
Jorge Aparicio
9070345c0e
add tests
2015-01-30 10:37:44 -05:00
Jorge Aparicio
a873316277
remove dead code
2015-01-30 10:37:44 -05:00
Jorge Aparicio
acb8c1aaa6
remove more ExprForLoop
s
2015-01-30 10:37:44 -05:00
Jorge Aparicio
76362f0a0e
custom message for refutable patterns in for loops
2015-01-30 10:37:44 -05:00
Jorge Aparicio
5e1820f346
fix tests
2015-01-30 10:37:44 -05:00
Jorge Aparicio
f9865eac18
fix fallout
2015-01-30 10:37:44 -05:00
Jorge Aparicio
9fdc0effd2
implement for loop desugaring
2015-01-30 10:36:31 -05:00
Jorge Aparicio
a65d3f5b98
core: add the IntoIterator
trait
2015-01-30 10:36:31 -05:00
bors
1a51eb9cca
Auto merge of #21717 - nick29581:prelude-fullrange, r=acrichto
...
r? @alexcrichton
2015-01-30 12:43:41 +00:00
bors
e0f5980ead
Auto merge of #21351 - eddyb:x-coerce--a-new-hope, r=nikomatsakis
...
Coercions will now attempt to autoderef as needed before reborrowing.
This includes overloaded `Deref`, e.g. `&Rc<T>` coerces to `&T`, and
`DerefMut`, e.g. `&mut Vec<T>` coerces to `&mut [T]` (in addition to `&[T]`).
Closes #21432 .
2015-01-30 07:57:14 +00:00
Nick Cameron
023d49e347
Change from core::ops::RangeFull to std::ops
2015-01-30 12:01:08 +13:00
Nick Cameron
bf2b473816
Rename FullRange to RangeFull
2015-01-30 12:01:08 +13:00
Nick Cameron
c64a96d385
Remove FullRange from the prelude etc.
2015-01-30 12:00:20 +13:00
Nick Cameron
a9d465fec9
Use absolute path to FullRange, rather than assuming it is in the prelude
...
Closes #21263
[breaking-change]
If you are using `core::ops::FullRange` you should change to using `core::ops::RangeFull`
2015-01-30 12:00:20 +13:00
bors
52c74e63da
Auto merge of #21692 - pnkfelix:fsk-fix-coerce-match-20055, r=eddyb
...
trans: When coercing to `Box<Trait>` or `Box<[T]>`, leave datum in it's original L-/R-value state.
This fixes a subtle issue where temporaries were being allocated (but not necessarily initialized) to the (parent) terminating scope of a match expression; in particular, the code to zero out the temporary emitted by `datum.store_to` is only attached to the particular match-arm for that temporary, but when going down other arms of the match expression, the temporary may falsely appear to have been initialized, depending on what the stack held at that location, and thus may have its destructor erroneously run at the end of the terminating scope.
FIx #20055 .
(There may be a latent bug still remaining in `fn into_fat_ptr`, but I am so annoyed by the test/run-pass/coerce_match.rs failures that I want to land this now.)
2015-01-29 22:54:19 +00:00
Eduard Burtescu
ae076e1e3b
Implement deref coercions ( rust-lang/rfcs#241 ).
2015-01-30 00:30:12 +02:00
Eduard Burtescu
b48c4c8cf4
rustc_typeck: cleanup coercion logic that has been obsolete/unused for a while now.
2015-01-30 00:27:12 +02:00
Eduard Burtescu
6a478bdfd2
rustc_typeck: use FnCtxt in coercion, instead of mimicking a combiner.
2015-01-30 00:27:12 +02:00
Eduard Burtescu
f9f3ba5920
rustc: move infer::coercion to rustc_typeck.
2015-01-30 00:27:12 +02:00
bors
7ea93abfb2
Auto merge of #21691 - edwardw:double-closure, r=nikomatsakis
...
It was considered to be impossible but actually it can
happen for nested closures. Also, because there must
be nested closures when this happens, we can use more
targeted help message.
Closes #21390
Closes #21600
2015-01-29 19:36:03 +00:00
bors
265a23320d
Auto merge of #21677 - japaric:no-range, r=alexcrichton
...
Note: Do not merge until we get a newer snapshot that includes #21374
There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672 ).
r? @alexcrichton
2015-01-29 16:28:52 +00:00
Jorge Aparicio
a6f9180fd6
bring back #[derive(Show)]
with a deprecation warning
2015-01-29 07:49:02 -05:00
Jorge Aparicio
4b75931ce2
fix import in cfail test
2015-01-29 07:49:02 -05:00
Jorge Aparicio
788181d405
s/Show/Debug/g
2015-01-29 07:49:02 -05:00
Jorge Aparicio
09ba9f5c87
remove #[old_impl_check] now that #21363 has been fixed
2015-01-29 07:49:02 -05:00
Jorge Aparicio
92e966e099
register snaphots
2015-01-29 07:49:02 -05:00
Jorge Aparicio
16a2503a1c
undo some conversions
2015-01-29 07:49:02 -05: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
3d6f5100af
Auto merge of #21730 - Manishearth:rollup, r=alexcrichton
...
Should clear our backlog of rollups from the queue
2015-01-29 11:28:30 +00: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
bors
c5961ad06d
Auto merge of #21522 - nikomatsakis:assoc-type-ice-hunt-take-3, r=nick29581
...
Do not propagate the region requirements on the projected type to the input types it is being projected from.
Fixes #21520 .
r? @aturon
2015-01-28 21:49:38 +00:00
Manish Goregaokar
092330c640
Rollup merge of 21643 - semarie:break-local_stage0, r=brson
2015-01-29 03:17:16 +05:30
Manish Goregaokar
d37d2167b2
Rollup merge of 21651 - nelsonjchen:add--webkit-overflow-scrolling-touch-to-book-css, r=alexcrichton
2015-01-29 03:16:52 +05:30
Manish Goregaokar
2403176dde
Rollup merge of 21654 - FlaPer87:unify-impls, r=alexcrichton
2015-01-29 03:16:25 +05:30
Manish Goregaokar
62b24c3dd5
Rollup merge of 21662 - oli-obk:hashmap_enum_json, r=alexcrichton
2015-01-29 03:15:51 +05:30
Manish Goregaokar
518ce538a9
Rollup merge of 21663 - tbu-:pr_doc_cell_static_safety, r=alexcrichton
2015-01-29 03:15:25 +05:30
Manish Goregaokar
0752c4a941
Rollup merge of 21671 - akiss77:pr-aarch64-fastisel0, r=alexcrichton
2015-01-29 03:14:58 +05:30
Manish Goregaokar
f553f58b7f
Rollup merge of 21681 - japaric:no-warn, r=alexcrichton
2015-01-29 03:14:35 +05:30
Manish Goregaokar
7abbc96e66
Rollup merge of 21708 - brson:internals, r=huonw
2015-01-29 03:13:53 +05:30