Commit graph

19410 commits

Author SHA1 Message Date
Brian Anderson
051fbcea72 Merge remote-tracking branch 'artagnon/abi-dead-code' into HEAD 2013-06-24 14:08:03 -07:00
Brian Anderson
3b7d4b93ff Merge remote-tracking branch 'cmr/issue/2773' into HEAD 2013-06-24 14:07:05 -07:00
Fedor Indutny
bc70edbb25 libc: (u)int => c_(u)int for consts 2013-06-24 21:06:51 +02:00
Philipp Brueschweiler
f8ae3cdcaa Fix test failure on windows
This patch ensures that the multiple extern definitions of `free` in the
run-pass tests have the same declaration, working around #7352.
2013-06-24 19:14:20 +02:00
Fedor Indutny
ddd6f59283 libc: add POSIX-compatible sysconf consts
Because its part of POSIX. Values are taken from FreeBSD, linux
and OSX header files.
2013-06-24 19:04:00 +02:00
Fedor Indutny
079b07df55 libc: support functions from sys/mman.h
Because its part of POSIX. Values are taken from FreeBSD, linux
and OSX header files.
2013-06-24 19:04:00 +02:00
Tuncer Ayaz
0a74ffcf04 vim/syntax/rust.vim: fix date header
The last change was made in 2013 not 2012.
2013-06-24 18:35:43 +02:00
Alex Crichton
b94f89fffc Fix 'static mut' tests 2013-06-24 07:42:32 -07:00
Corey Richardson
fe6a4fd74a Un-xfail working test 2013-06-24 08:05:41 -04:00
bors
c6515ee6a7 auto merge of #7193 : Thiez/rust/fixbench, r=cmr
This PR fixes a few problems with the benchmark, mentioned in #2913. Since I do not have a 4GB RAM machine (I run rust on a puny 2GB RAM VM) I can't test binarytrees with N=20. If it works we can close #2913.

Fixes: 1) binarytrees prints "long lived trees of depth" instead of "long lived tree of depth"
Fixes: 2) chameneosredux -- the whitespace printed by show_number should be the same as printed by show_color
Already fixed: 3) spectralnorm prints an extra 

Fixes: 4) threadring prints an extra 

Fixes: 5) fasta -- strangely, output stops half-way through line 169 -- with another 8166 lines still to do.
Could not test: 6) the latest binarytrees fails with input N=20 on a 4GB machine.

r?
2013-06-24 04:43:51 -07:00
blake2-ppc
6291702cf3 iterator: Add IteratorUtil::flat_map_ method
flat_map_ produces an iterator that maps each element to an iterator,
and yields the elements of the produced iterators.

This is the monadic bind :: M a -> (a -> M b) -> M b  for iterators.

Named just like the vec method, but with a trailing underline until the
method resolution bug is resolved.
2013-06-24 12:50:41 +02:00
bors
dfb7de8e0e auto merge of #7334 : thestinger/rust/old_iter, r=Aatch
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and
written in an ancient dialect of Rust so I've just removed it

this also removes `to_vec` from DList because it's provided by
`std::iter::to_vec`

an Iterator implementation is added for OptVec but some transitional
internal iterator methods are still left
2013-06-24 00:52:53 -07:00
Daniel Micay
da1a9a30fd work around ICE from default method
issue #7341
2013-06-24 01:58:10 -04:00
Daniel Micay
1e7ca8dd24 xfail-pretty on un-xfailed test 2013-06-24 01:45:06 -04:00
bors
832fe32721 auto merge of #7207 : DaGenix/rust/sha2, r=pcwalton
This pull request contains an unoptimized implementation of most of the SHA-2 functions (everything but the variable output size versions). I also created a common trait (Digest) for all of the interesting methods for working with digests and updated the existing SHA-1 code to use it. Finally, while working with the SHA-1 code, I got rid of the use of @ types and type objects.

I've tested all functions against the Wikipedia test vectors. Additionally, I tested the SHA-512, 384, and 256 variants against the Java implementations of those digests.

I did my best to try to follow Rust conventions, but, there are so many different conventions in the code base right now that I'm not sure if I'm following the correct one or not. Anyway, I'm happy to rework if I didn't get the coding convention right (or if there are bugs!).
2013-06-23 22:40:53 -07:00
Daniel Micay
3ab5ec4b7c iterator: implement collect with FromIterator
This makes it take advantage of the size hint for pre-allocation.
2013-06-24 01:35:15 -04:00
Daniel Micay
8779be39e1 implement Clone for slices 2013-06-24 01:35:12 -04:00
Daniel Micay
60ed659620 deal with windows 2013-06-24 01:35:12 -04:00
Daniel Micay
369b0a56e8 xfail tests again for now (issues #7336, #7340) 2013-06-24 01:35:12 -04:00
Corey Richardson
adb8ac4162 Fix/annotate a variety of xfails 2013-06-24 01:35:11 -04:00
Daniel Micay
e2e39234cc remove old_iter
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and
written in an ancient dialect of Rust so I've just removed it

this also removes `to_vec` from DList because it's provided by
`std::iter::to_vec`

an Iterator implementation is added for OptVec but some transitional
internal iterator methods are still left
2013-06-24 01:35:11 -04:00
Palmer Cox
711273f5b4 Implement the fixed output size versions of the SHA-2 digest functions. 2013-06-24 00:04:02 -04:00
Palmer Cox
89eef0b139 Create a Digest trait for common methods on digests and convert the SHA-1 implementation to use it.
The DigestUtil trait was created for helper methods since default methods still have issues.
2013-06-24 00:04:00 -04:00
Palmer Cox
e1b8c67580 Improve the SHA-1 implementation
* Rename struct Sha1State to Sha1
* Remove all use of @ types
* Use fixed length vectors
* Move all of the inner functions from inside sha1() to top level, private functions
* Sha1 instances are now created via Sha1::new()
* Update all constant names to uppercase
* Remove unecessary assert_eq!s
* Remove check_vec_eq() helper function; use vec::eq() instead
2013-06-24 00:02:45 -04:00
Palmer Cox
c5400a8830 Create a crypto submodule and move the SHA-1 implementation into it. 2013-06-23 23:38:46 -04:00
Alex Crichton
8fdc8f392c Support foreign 'static mut' variables as well 2013-06-23 18:00:32 -07:00
Alex Crichton
1841b31c61 Add 'static mut' items to the language 2013-06-23 17:59:35 -07:00
bors
ac4211ef52 auto merge of #7279 : hanny24/rust/master, r=msullivan
This commit adds filtered method for Option type. It is not exactly necessary (chain method can be used instead), however I believe that this approach using extra filtered method is more convinient.
2013-06-23 17:40:56 -07:00
Matthijs Hofstra
7ba1a239a4 Changed Arena API to make it usable once more. 2013-06-24 00:09:04 +02:00
bors
f82756180b auto merge of #7314 : bblum/rust/trait-bounds2, r=nikomatsakis
Fixed a merge conflict, some tests, some bitrotting, etc., from #7248.
2013-06-23 14:58:58 -07:00
Ben Blum
ba3f43e506 Fix pretty-printing builtin bounds on closures and traits 2013-06-23 17:54:25 -04:00
Ben Blum
1d2b20ee2c Check existential type contents against destination trait bounds. 2013-06-23 17:54:24 -04:00
Ben Blum
1ffcc6fc82 Allow ~fn:Copy() to be copied. 2013-06-23 17:54:21 -04:00
Matthijs Hofstra
6762754d5b Updated shootout-fasta.rs copyright years, removed stuff that caused lint to complain. 2013-06-23 23:21:35 +02:00
Matthijs Hofstra
66fd3c9e5d Fixed shootout-fasta.rs output 2013-06-23 23:21:35 +02:00
Matthijs Hofstra
de64ff20ab Added missing copyright notice to shootout-spectralnorm. 2013-06-23 23:21:35 +02:00
Matthijs Hofstra
b306f9fa40 Changed shootout-chameneos-redux output to conform to the 'official' output format. 2013-06-23 23:21:35 +02:00
Matthijs Hofstra
3b1ace9f9b Updated copyright year on shootout-binarytrees.rs 2013-06-23 23:21:34 +02:00
Matthijs Hofstra
a4a8a4ac27 Fixed os:: and int:: not being in scope, changed io::println to println 2013-06-23 23:21:34 +02:00
Brian Anderson
3da7c8f7e1 compiletest: Shorten test names 2013-06-23 12:50:11 -07:00
Ben Blum
c454e95fac Add basic test cases for closure bounds. (#3569) 2013-06-23 14:40:18 -04:00
Ben Blum
7c0a0404d5 Check closure freevar kinds against destination environment bounds (#3569) 2013-06-23 14:40:18 -04:00
Ben Blum
f4ccb2fa85 Add tests for not-kind-checked trait bounds. 2013-06-23 14:40:18 -04:00
Ben Blum
ce857e3d60 Parse and typecheck (not kindcheck) bounds on trait paths. 2013-06-23 14:40:14 -04:00
Ramkumar Ramachandra
8cadca4e41 abi: remove dead code
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-24 00:04:46 +05:30
bors
cb58b19f02 auto merge of #7319 : thestinger/rust/hashmap-iterator, r=thestinger
#7277
2013-06-23 11:13:54 -07:00
Ben Blum
394f455b5e Fix error messages in test cases, since fns/traits now pretty-print with a bounds list 2013-06-23 13:53:39 -04:00
Ben Blum
fcf361745f Add rules for assert, fail, and deriving to vim syntax file. Also highlight the mod path in "use module;" properly. 2013-06-23 13:53:39 -04:00
Philipp Brüschweiler
ce888a5055 Fix reflect-visit-type for iterator changes 2013-06-23 17:15:37 +02:00
bors
c17ff80e01 auto merge of #7267 : luqmana/rust/issue-5792, r=cmr
Fixes #5792
2013-06-23 07:52:55 -07:00