Brian Anderson
2cdb23bbc0
Replace uses of 'unchecked' with 'unsafe'
2012-09-18 11:31:57 -07:00
Erick Tryzelaar
10e317de54
vec::u8 => vec::bytes ( #3444 )
2012-09-15 13:38:41 -07:00
Graydon Hoare
aa2ab2659f
Add core::reflect, start migrating core::repr to use it. Tidy up various Repr types.
2012-09-14 19:09:38 -07:00
Graydon Hoare
c5347b4bf9
Fix implicit-instantiation of non-implicitly-copyable warnings.
2012-09-13 19:53:30 -07:00
Niko Matsakis
2f6b66ecd3
s/vec::as_buf/vec::as_imm_buf/, fix comment, remove set.rs
...
hat tip to @jruderman
2012-09-13 13:24:33 -07:00
Niko Matsakis
109055c7d3
make iter::position() not require Eq
2012-09-13 09:14:49 -07:00
Brian Anderson
ff54ac8e59
Rename vec::unsafe to vec::raw
2012-09-12 17:45:36 -07:00
Niko Matsakis
5d540de769
fixup mutability of vec::each, make iter_bytes pure
...
also, change DVec() to work with imm vectors rather than mut ones
2012-09-12 13:29:31 -07:00
Tim Chevalier
c087886e93
Make moves explicit in arguments
2012-09-11 20:02:34 -07:00
Brian Anderson
8672b9003f
Merge pull request #3440 from jld/vec-dedup
...
Add vec::dedup for in-place consecutive duplicate element removal.
2012-09-11 17:25:21 -07:00
Tim Chevalier
a07ea73bdb
Make moves explicit in task; also make option::unwrap take its argument by move
2012-09-10 13:36:54 -07:00
Tim Chevalier
c104745255
Make moves explicit in vec
...
I'm continuing to make moves explicit, despite #3413 , because that
seems like the most reliable way to make these changes. Once I've made
all the moves explicit, the test for #3413 will be that I can remove them.
2012-09-10 11:15:36 -07:00
Jed Davis
4ea45669b8
Add vec::dedup for in-place consecutive duplicate element removal.
2012-09-10 00:42:58 -07:00
Brian Anderson
f53c2948aa
Rename variables that clash with keywords
2012-09-09 16:53:19 -07:00
Brian Anderson
3bd1f32cd9
Convert all kind bounds to camel case. Remove send, owned keywords.
2012-09-07 18:10:11 -07:00
Patrick Walton
feb014eb3c
rustc: Add an "ne" method to the Eq trait, and implement it everywhere
2012-09-07 12:24:48 -07:00
Patrick Walton
437073868e
libcore: "import" -> "use"
2012-09-04 11:12:17 -07:00
Brian Anderson
f393100b7c
Camel case core::ops
2012-09-02 18:13:56 -07:00
Brian Anderson
49c9ac175f
Silence non-implicitly-copyable-typarams in coretest
2012-09-02 16:34:36 -07:00
Brian Anderson
087c5032a8
core: deny(vecs_implicity_copyable)
2012-09-02 15:38:18 -07:00
Brian Anderson
d777e51333
Demode reinterpret_cast
2012-09-01 18:18:29 -07:00
Tim Chevalier
4128cc4cb4
Make utility funs in core::int, core::uint, etc. not by-reference
...
Closes #3302
2012-08-31 16:21:47 -07:00
Erick Tryzelaar
c0f357924d
libcore: vec::u8::hash is pure.
2012-08-30 20:40:52 -07:00
Erick Tryzelaar
0e1a4a4da2
libcore: rewrite vec::unsafe::from_buf in pure rust
2012-08-30 20:40:52 -07:00
Graydon Hoare
a9619306a5
Start moving core::hash to support a Hash trait. Add to_bytes::IterBytes trait.
2012-08-30 12:38:28 -07:00
Patrick Walton
9518fc79ea
cargo: Fix some lack of knowledge of basic algebraic identities
2012-08-30 10:39:28 -07:00
Patrick Walton
a1c11cab2d
rustc: Make <=
, >=
, and >
use traits as well
2012-08-29 19:23:15 -07:00
Patrick Walton
96534365c2
rustc: Make <
and =
into traits
2012-08-29 18:25:22 -07:00
Brian Anderson
c0c8d3aa8f
core: Demode int/uint mods
2012-08-29 16:23:36 -07:00
Jed Davis
3e4b55807d
Add vec::truncate, for efficiently shortening a vector.
2012-08-29 13:46:49 -07:00
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
Gareth Daniel Smith
be0141666d
convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-04 19:18:13 -07:00
Graydon Hoare
debb7e4641
Switch 'native' to 'extern' (or 'foreign' in some descriptions)
2012-07-03 16:11:00 -07:00
Brian Anderson
6d411342c6
Merge remote-tracking branch 'brson/uv'
...
Conflicts:
src/libstd/net_ip.rs
src/libstd/net_tcp.rs
2012-07-02 14:03:38 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Jeff Olson
5ec68ac482
core: export vec::unshift
2012-06-29 15:41:55 -07:00
Eric Holk
59221e9ac8
replace more vector + (issue #2719 )
2012-06-28 13:52:23 -07:00
Eric Holk
ae06546bbf
Replace more vector + (issue #2719 )
2012-06-27 23:09:51 -07:00
Eric Holk
0b84437b68
Replace more vector additions (issue #2719 )
2012-06-27 22:49:05 -07:00
Eric Holk
0c42a3ffee
vec::append reuses its left hand side when possible. (issue #2719 )
2012-06-27 16:19:49 -07:00
Eric Holk
c3b98cabe1
Removed pretty much all the vector+ from core (issue #2719 )
2012-06-27 15:22:06 -07:00
Eric Holk
133fdc1148
Remove unnecessary bounds checks in vec::push_all (issue #2719 )
...
Don't needlessly drop closures (issue #2603 )
2012-06-27 11:32:22 -07:00
Eric Holk
a08281616f
More perf tweaks (issue #2719 )
2012-06-26 14:08:16 -07:00
Eric Holk
b9d3ad0736
Getting rid of lots more vector +=. (issue #2719 )
2012-06-26 00:39:18 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Eric Holk
b837f37d40
vec::slice is faster now (Issue #2719 )
2012-06-25 17:08:06 -07:00
Eric Holk
b19c98ea9a
Some perf fixes, although vec::slice is still too slow (Issue #2719 )
2012-06-25 16:38:12 -07:00
Brian Anderson
fad307d7b4
core: Convert declarations to not use the trailing 'unsafe' notation
2012-06-25 12:48:39 -07:00
Eric Holk
07e1d1c6b6
Improved graph500 performance (Issue #2719 )
2012-06-25 11:15:45 -07:00