Commit Graph

193 Commits

Author SHA1 Message Date
Niko Matsakis
206edf66c9 make rand code use slices 2012-08-27 19:56:42 -07:00
Patrick Walton
ff513b1bcd libcore: Replace a bunch of "== None" with ".is_none()".
Generally, "== None" calls into the shape glue, and it's also more useful.
2012-08-27 17:49:35 -07:00
Patrick Walton
0e5a0e1da5 libcore: Implement equality and ordering on vectors 2012-08-27 17:16:41 -07:00
Graydon Hoare
5d56da1678 Convert over some residual uses of #oldmacros. 2012-08-27 13:54:12 -07:00
Brian Anderson
8337fa1a54 Camel case the option type 2012-08-26 15:56:16 -07:00
Michael Sullivan
1ce7902a41 Add a Buildable interface for constructing general sequences. Work on #2921. 2012-08-24 22:56:05 -07:00
Michael Sullivan
c87e9a5815 Get rid of the unseemly reinterpret_casts in build_sized implementations. Closes #3272. 2012-08-24 22:56:05 -07:00
Niko Matsakis
a08f3a7d4d More complete fix to #3162 (borrowck bug related to access to rec fields) 2012-08-23 18:54:08 -07:00
Ben Blum
dcbeebc801 Make vec::zip not require T:copy (close #3254) 2012-08-23 21:09:57 -04:00
Michael Sullivan
226fd87199 Make a bunch more of the iteration functions/methods marked pure. Closes #3253. 2012-08-23 10:22:33 -07:00
Ben Blum
fe2566777d Use swap_remove in pipes::select(). Close #3219. 2012-08-22 22:20:42 -04:00
Ben Blum
20773f33f5 Add vec::swap_remove (#3219) 2012-08-22 22:20:42 -04:00
Brian Anderson
74c69e1053 Convert more core types to camel case 2012-08-15 14:14:20 -07:00
Brian Anderson
5394e34aa4 core: Camel case some lesser-used modules 2012-08-13 18:59:48 -07:00
Brian Anderson
6b43c0c1ad Stop parsing old operator overloading syntax 2012-08-13 18:59:17 -07:00
Patrick Walton
5bd4110170 rustc: Mostly implement region-bounded stack closures 2012-08-13 15:34:36 -07:00
Niko Matsakis
1b2d91c79d de-mode-ify infer and some parts of typeck
also, fix bug in the various lint passes that fn() was considered
not suitable for the default mode
2012-08-09 18:26:50 -07:00
Brian Anderson
6a0720b439 Convert impls to new syntax 2012-08-08 18:19:24 -07:00
Michael Sullivan
79b5f68176 Implement + for @-vectors. 2012-08-08 14:30:45 -07:00
Brian Anderson
ecaf9e39c9 Convert alt to match. Stop parsing alt 2012-08-06 15:36:30 -07:00
Brian Anderson
025d86624d Switch alts to use arrows 2012-08-05 22:08:09 -07:00
Eric Holk
bd195518c7 Fix an apparent race in pipes.
Also removed some unsafety in pipes and added vec::consume_mut.
2012-08-02 19:27:07 -07:00
Niko Matsakis
97452c0ca1 Remove modes from map API and replace with regions.
API is (for now) mostly by value, there are options to use it by
reference if you like.  Hash and equality functions must be pure
and by reference (forward looking to the day when something
like send_map becomes the standard map).
2012-08-02 15:53:28 -07:00
Brian Anderson
b355936b4d Convert ret to return 2012-08-01 19:16:06 -07:00
Erick Tryzelaar
71927615e0 core: change vec's ref_set to set_ref, move get_ref to unsafe::get. 2012-08-01 12:37:13 -07:00
Patrick Walton
b414db041b rustc: Parse by-reference pattern bindings with the "ref" keyword 2012-07-31 19:26:25 -07:00
Brian Anderson
e178999833 core: More magic to make core build with --test 2012-07-28 16:06:25 -07:00
Patrick Walton
01e2471cb7 core: Trait-ify various overloaded operators 2012-07-27 14:52:46 -07:00
Eric Holk
0a8b794a3a Add #[inline(never)], and also fixed inlining on vec::push 2012-07-26 11:37:57 -07:00
Niko Matsakis
3bcd973419 from_fn and ref_set do not require copy bound 2012-07-25 05:45:52 -07:00
Graydon Hoare
fada46c421 Add core::hash containing SipHash-2-4 implementation. Re: #1616 and #859. 2012-07-24 17:11:13 -07:00
Graydon Hoare
a63e0e47f0 Update some str functions to slices, merge as_buf and unpack_slice. 2012-07-24 12:35:52 -07:00
Erick Tryzelaar
66ebdbb283 libcore: whitespace cleanup. 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
971b59106a libcore: add vec memcpy and memmove fns 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
9d4aab80a7 libcore: add vec::{mut_view, const_view}. 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
a762c725b5 libcore: Modernize a docstring 2012-07-23 17:15:30 -07:00
Niko Matsakis
eb0a34c398 iterate only over immutable vectors; use newer region notation
Unfortunately, right now iterating over const vectors is
not safe.  This is because the callback expects an *immutable*
reference (in region terms: &T), not a const reference (&const T).
This was not being caught by the type system due to the use of
unsafe operations.  To fix this, we need to either (1) find a way
to parameterize over mutability or (2) add each_const, each_mut
etc
2012-07-18 11:48:58 -07:00
Michael Sullivan
aa5b5ab886 Create some infrastructure for building up @-vectors. Work on #2921. 2012-07-17 17:09:25 -07:00
Patrick Walton
db020ab63c rustc: Implement and enforce instance coherence 2012-07-17 15:46:43 -07:00
Ben Blum
156eceb24a dvec/vec interface cleanup: fixing reach, reverse, adding more pure 2012-07-17 13:32:52 -04:00
Michael Sullivan
92743dc2a6 Move the world over to using the new style string literals and types. Closes #2907. 2012-07-14 01:03:43 -07:00
Eric Holk
05543fd04d Make tests pass 2012-07-12 20:09:30 -07:00
Patrick Walton
6e98416662 libcore: Add a to_slice_ptr function 2012-07-12 19:44:00 -07:00
Eric Holk
aba665da32 Fix the signature on vec::view.
Due to limitations in region inference, this has the effect of making vec::view pretty much entirely unusable.
2012-07-12 18:16:00 -07:00
Michael Sullivan
1c62f5ff74 Get rid of all of the remaining /~s in the code base. 2012-07-12 15:13:18 -07:00
Patrick Walton
fdf0c1b353 core: Newtype a bunch of types in libcore 2012-07-11 12:47:32 -07:00
Eric Holk
a787f40013 Select on pipes.
Updating syntax and test cases.
2012-07-06 10:42:39 -07:00
Eric Holk
67b0760592 Moved pipes runtime support to libcore, and add a test that will help verify that busy waiting is no longer happening.
Fixing the result of a bad merge.
2012-07-06 10:42:39 -07:00
Eric Holk
5c3889a02f Contracts work well enough to do the message ring benchmark, and it's really fast.
Fixing old-style vector, and xfail-prettying th contracts test because the pretty printer is unhappy.
2012-07-06 10:42:38 -07:00
Eric Holk
4dbd10a702 First example of a program using pipes. 2012-07-06 10:42:37 -07:00