Commit Graph

21889 Commits

Author SHA1 Message Date
bors
1ac8e8885b auto merge of #8884 : blake2-ppc/rust/exact-size-hint, r=huonw
The message of the first commit explains (edited for changed trait name):

The trait `ExactSize` is introduced to solve a few small niggles:

* We can't reverse (`.invert()`) an enumeration iterator
* for a vector, we have `v.iter().position(f)` but `v.rposition(f)`.
* We can't reverse `Zip` even if both iterators are from vectors

`ExactSize` is an empty trait that is intended to indicate that an
iterator, for example `VecIterator`, knows its exact finite size and
reports it correctly using `.size_hint()`. Only adaptors that preserve
this at all times, can expose this trait further. (Where here we say
finite for fitting in uint).

---

It may seem complicated just to solve these small "niggles",
(It's really the reversible enumerate case that's the most interesting)
but only a few core iterators need to implement this trait.

While we gain more capabilities generically for some iterators,
it becomes a tad more complicated to figure out if a type has
the right trait impls for it.
2013-09-03 06:56:05 -07:00
bors
7048e05d5f auto merge of #8932 : huonw/rust/closed-issues, r=thestinger 2013-09-03 05:46:00 -07:00
bors
d252d810fc auto merge of #8939 : Kimundi/rust/master, r=huonw 2013-09-03 04:36:03 -07:00
Marvin Löbel
7419085337 Modernized a few more types in syntax::ast 2013-09-03 14:45:06 +02:00
Huon Wilson
490c0c7f24 Re-xfail extern-pass-TwoU{8,16}.rs (still doesn't work on 32-bit platforms). 2013-09-03 21:35:51 +10:00
Seo Sanghyeon
877e7f3463 Correctly determine OS to xfail in cross build 2013-09-03 19:34:23 +09:00
Huon Wilson
12099ce94c Tests for fixed issues.
Closes #3794.
Closes #4025.
Closes #5688.
Closes #5708.
Closes #7012.
Closes #7327.
2013-09-03 20:00:42 +10:00
Huon Wilson
364beaa776 Un-xfail/move/delete some tests. 2013-09-03 20:00:41 +10:00
bors
8183c74ec1 auto merge of #8940 : pnkfelix/rust/fsk-8468-allow-underscore-paramname-in-trait-default-method, r=alexcrichton
Fix #8468.  (Though the right answer in the end, as noted on the dialogue on the ticket, might be to just require trait methods to name their parameters, regardless of whether they have a default method implementation or not.)
2013-09-03 02:56:03 -07:00
Felix S. Klock II
1b3cd960de Incorporate review feedback. Fix #8468. 2013-09-03 11:15:41 +02:00
Daniel Micay
a6a993ee71 repr: add very basic support for functions
Closes #8917
2013-09-03 04:45:00 -04:00
Daniel Micay
09ad0cd362 add type name to the tydesc
Closes #8926
2013-09-03 04:44:47 -04:00
Alex Crichton
7e7024718a Don't have format! move out of local variables 2013-09-02 23:53:13 -07:00
bors
58decdd7a1 auto merge of #8941 : alexcrichton/rust/fix-comment, r=thestinger 2013-09-02 22:10:57 -07:00
Alex Crichton
aeb2f88a48 Raise the file descriptor limits when running compiletest
We already do this for libstd tests automatically, and compiletest runs into the
same problems where when forking lots of processes lots of file descriptors are
created. On OSX we can use specific syscalls to raise the limits, in this
situation, though.

Closes #8904
2013-09-02 21:50:50 -07:00
Alex Crichton
70f3cabe46 Fix the std::fmt doc-block to show up in pandoc 2013-09-02 21:19:11 -07:00
bors
4f151b388b auto merge of #8936 : pnkfelix/rust/fsk-issue-2355-testcase, r=alexcrichton
Fix #2355.
2013-09-02 20:15:52 -07:00
Felix S. Klock II
ba1f44d24f Regression test for #8468. 2013-09-03 01:58:36 +02:00
Felix S. Klock II
4fa28a2e85 Allow _ param name in trait default method for #8468. 2013-09-03 01:58:12 +02:00
Felix S. Klock II
af3cde2c97 Long awaited test case for #2355. 2013-09-02 23:19:04 +02:00
bors
fc9fa2cb6c auto merge of #8933 : luqmana/rust/ot, r=pnkfelix
Fixes #6540. Also remove a fixme for #2619 since it's not relevant anymore.
2013-09-02 13:10:48 -07:00
Steven Fackler
319b8833d8 Implement BufReader 2013-09-02 14:24:21 -04:00
Luqman Aden
462604ace1 librustc: Check for empty crate link meta name and vers. 2013-09-02 13:48:20 -04:00
Luqman Aden
0691c01562 libsyntax: Remove obsolete fixme. 2013-09-02 13:48:20 -04:00
bors
7ff102a685 auto merge of #8927 : thestinger/rust/repr, r=huonw 2013-09-02 02:05:45 -07:00
Daniel Micay
67a8ea521a switch __field__ hack to <unnamed_field>
avoids conflict with fields actually named `__field__`
2013-09-02 05:00:42 -04:00
Daniel Micay
331d2d6d31 repr: handle tuple structs sanely
Closes #8919
2013-09-02 04:10:56 -04:00
bors
6a3dd30afe auto merge of #8931 : ILyoan/rust/turnoff_android_ndk_asm, r=thestinger
Now we don't need android ndk to generate unwind info for arm target thanks to LLVM upgrade.
This fix removes the ndk asm pass.
2013-09-02 00:20:44 -07:00
Daniel Micay
cc1f0027c7 repr: add support for trait objects
Closes #8916
2013-09-02 02:50:14 -04:00
bors
8f678ae688 auto merge of #8928 : novalis/rust/fix-8898, r=thestinger
I think this fixes 8898.  I'm a bit unsure about how slices and owned pointers to vectors-of-unit already worked, but since they were already working, I didn't mess with them.
2013-09-01 22:35:45 -07:00
Daniel Micay
7a52154d78 repr: print functions as fn() 2013-09-02 00:19:34 -04:00
Ilyong Cho
cbd143f966 turn off android ndk asm pass 2013-09-02 11:55:54 +09:00
novalis
c4bb88364e Fix #8898 2013-09-01 22:35:19 -04:00
blake2-ppc
61026ae621 rt::io: Add Bytes iterator for Reader
An iterator that simply calls `.read_bytes()` each iteration.

I think choosing to own the Reader value and implementing Decorator to
allow extracting it is the most generically useful. The Reader type
variable can of course be some kind of reference type that implements
Reader.
2013-09-02 03:12:32 +02:00
bors
73a28e595c auto merge of #8920 : Kimundi/rust/master, r=thestinger 2013-09-01 16:15:41 -07:00
Marvin Löbel
857f867320 Renamed syntax::ast::ident -> Ident 2013-09-02 02:51:21 +02:00
Daniel Micay
1f4aba8cbf touch llvm clean trigger 2013-09-01 15:03:28 -04:00
blake2-ppc
7c369ee733 std/extra: Add ExactSize for Bitv, DList, RingBuf, Option iterators 2013-09-01 18:20:24 +02:00
blake2-ppc
35040dfccc std::iterator: Use ExactSize, inheriting DoubleEndedIterator
Address discussion with acrichto; inherit DoubleEndedIterator so that
`.rposition()` can be a default method, and that the nische of the trait
is clear. Use assertions when using `.size_hint()` in reverse enumerate
and `.rposition()`
2013-09-01 18:17:26 +02:00
blake2-ppc
04845f0aeb std::iterator: Add back .rposition() test 2013-09-01 18:17:19 +02:00
bors
c70486fffe auto merge of #8913 : poiru/rust/issue-8702, r=cmr
Closes #8702.
2013-09-01 08:50:44 -07:00
bors
7c5398b612 auto merge of #8276 : kballard/rust/iterator-protocol, r=cmr
r? @thestinger
2013-09-01 07:00:44 -07:00
bors
66593a733d auto merge of #8911 : Kimundi/rust/master, r=huonw
Most notable: span -> Span
2013-09-01 05:30:47 -07:00
Marvin Löbel
539f37925c Modernized a few type names in rustc and syntax 2013-09-01 14:43:26 +02:00
Birunthan Mohanathas
30fc2c8df2 Fix incorrect strftime error handling in rust_localtime
Closes #8702.
2013-09-01 14:57:29 +03:00
bors
617850131b auto merge of #8907 : pnkfelix/rust/fsk-fix-makefile-8865, r=thestinger
Fix #8865.
2013-08-31 17:35:39 -07:00
bors
a60c6a8b18 auto merge of #8903 : luqmana/rust/en, r=thestinger
Fixes #8735.
2013-08-31 16:25:40 -07:00
Felix S. Klock II
b1a22518f0 small cleanup of previous commit with mucho comments. 2013-09-01 00:53:56 +02:00
bors
04fac7f90d auto merge of #8899 : thestinger/rust/repr, r=huonw 2013-08-31 15:15:40 -07:00
Felix S. Klock II
f61713a5eb hypothetical fix for #8865. 2013-09-01 00:11:30 +02:00