Commit Graph

71 Commits

Author SHA1 Message Date
Patrick Walton
ad02510258 libcore: Implement a memory-safe "each_val" for data in aliasable, mutable locations 2012-11-02 10:17:32 -07:00
Mahmut Bulut
f938714be1 Remove trait of TimesIx 2012-10-30 15:19:14 +02:00
Tim Chevalier
11e92f37c1 Remove uses of binary move - <- - from tests and libraries 2012-10-23 12:10:03 -07:00
Tim Chevalier
65c96f849f Forbid deprecated modes again in core
Sadly, there's only one file that requires deprecated modes
(stackwalk)... So, forbid them everywhere else.
2012-10-04 16:48:57 -07:00
Tim Chevalier
f78cdcb636 Removing explicit uses of + mode
This removes most explicit uses of the + argument mode. Pending a
snapshot, I had to remove the forbid(deprecated_modes) pragma from
a bunch of files. I'll put it back!

+ mode still has to be used in a few places for functions that get
moved (see task.rs)

The changes outside core and std are due to the to_bytes trait and
making the compiler (with legacy modes on) agree with the libraries
(with legacy modes off) about modes.
2012-10-02 14:31:39 -07:00
Graydon Hoare
39f114d171 De-export iter and result. Part of #3583. 2012-10-01 17:27:56 -07:00
Tim Chevalier
3639d38d5c Add a demoded version of ptr::addr_of
Currently, the new version is ptr::p2::addr_of and the old one is
ptr::addr_of. This is kind of cheesy, but I need a snapshot before I
can ditch the old version, since the pipe compiler generates calls to
addr_of.

core is converted over to use the new version, std is not.
2012-09-28 22:19:01 -07:00
Tim Chevalier
f1014c43fd Finish demoding iter: from_elem, copy_seq, map, append 2012-09-28 21:52:32 -07:00
Tim Chevalier
84b0583064 Squash a couple pattern warnings that I missed 2012-09-28 17:59:01 -07:00
Tim Chevalier
a3a257cc3b Demode iter::foldl and friends 2012-09-28 17:57:02 -07:00
Tim Chevalier
fec96b2ae0 Demoding in iter: any, all, map_to_vec, flat_map_to_vec, filter_to_vec 2012-09-28 17:44:15 -07:00
Brian Anderson
8766c2e35b core: Demode patterns 2012-09-28 16:57:36 -07:00
Brian Anderson
438bdd687b core: More option demoding 2012-09-27 17:49:10 -07:00
Brian Anderson
e8fe718bfd core: Replace map/map_default with map_ref/map_default_ref 2012-09-26 20:15:23 -07:00
Patrick Walton
a7db161eed Revert "Revert "libcore: De-mode at_vec""
This reverts commit fe09451a5a.
2012-09-26 12:29:27 -07:00
Tim Chevalier
e19e628b19 Demode iter-trait 2012-09-25 22:13:05 -07:00
Tim Chevalier
fe09451a5a Revert "libcore: De-mode at_vec"
This reverts commit ab6318803e.
2012-09-25 20:59:14 -07:00
Patrick Walton
ab6318803e libcore: De-mode at_vec 2012-09-25 18:06:26 -07:00
Niko Matsakis
ba3eebd41d Make it illegal to use modes in a fn signature with providing
an explicit variable name. (Step one to changing the defaults)

First step to #3535
2012-09-23 13:30:13 -05:00
Niko Matsakis
3d59ac3a19 De-mode vec::map, vec::eachi, vec::rev_each, vec::rev_eachi 2012-09-21 19:13:55 -07:00
Niko Matsakis
cfed923600 demode the each() method on vec and other iterables. 2012-09-19 17:03:01 -07:00
Brian Anderson
c115b82238 core: Clean up crate docs and give all mods a brief description 2012-09-19 16:52:59 -07:00
Niko Matsakis
9cf271fe96 De-mode vec::each() and many of the str iteration routines
Note that the method foo.each() is not de-moded, nor the other
vec routines.
2012-09-19 10:52:59 -07:00
Niko Matsakis
109055c7d3 make iter::position() not require Eq 2012-09-13 09:14:49 -07:00
Patrick Walton
22b8757705 rustc: Make shape-based compare glue never called for comparison operators.
Only called for string patterns.
2012-09-10 12:48:42 -07:00
Tim Chevalier
e666fe89dd Make more moves explicit in libcore 2012-09-10 12:38:52 -07:00
Brian Anderson
3bd1f32cd9 Convert all kind bounds to camel case. Remove send, owned keywords. 2012-09-07 18:10:11 -07:00
Brian Anderson
087c5032a8 core: deny(vecs_implicity_copyable) 2012-09-02 15:38:18 -07:00
Patrick Walton
96534365c2 rustc: Make < and = into traits 2012-08-29 18:25:22 -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
Paul Stansifer
29f32b4a72 m1!{...} -> m1!(...) 2012-08-23 11:14:14 -07: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
Brian Anderson
74c69e1053 Convert more core types to camel case 2012-08-15 14:14:20 -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
Brian Anderson
b355936b4d Convert ret to return 2012-08-01 19:16:06 -07:00
Lindsey Kuper
439afaa329 Change remaining "iface" occurrences to "trait"; deprecate "iface" 2012-07-31 11:52:16 -07:00
Paul Stansifer
a9cc5066ee Change syntax extension syntax: #m[...] -> m!{...}. 2012-07-30 18:38:15 -07:00
Paul Stansifer
1c472564e3 Add 5.timesi() |idx| { ... } 2012-07-24 11:44:58 -07:00
Patrick Walton
db020ab63c rustc: Implement and enforce instance coherence 2012-07-17 15:46:43 -07: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
Patrick Walton
fdf0c1b353 core: Newtype a bunch of types in libcore 2012-07-11 12:47:32 -07:00
Ben Striegel
d162fa26ba A new times method on numeric types
This method is intended to elegantly subsume two common iteration functions.
The first is `iter::range`, which is used identically to the method introduced
in this commit, but currently works only on uints. The second is a common case
of `{int, i8, uint, etc.}::range`, in the case where the inductive variable is
ignored. Compare the usage of the three:
```
for iter::range(100u) {
    // do whatever
}

for int::range(0, 100) |_i| {
    // do whatever
}

for 100.times {
    // do whatever
}
```
I feel that the latter reads much more nicely than the first two approaches,
and unlike the first two the new method allows the user to ignore the specific
type of the number (ineed, if we're throwing away the inductive variable, who
cares what type it is?). A minor benefit is that this new method will be
somewhat familiar to users of Ruby, from which we borrow the name "times".
2012-07-05 19:44:20 -07:00
Brian Anderson
41bca84dd9 core: Convert iter::repeat to the for protocol 2012-07-03 17:31:31 -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
Ben Blum
e56ba156e2 Add position() to iter/iter-trait 2012-06-28 00:02:16 -04:00
Eric Holk
c3b98cabe1 Removed pretty much all the vector+ from core (issue #2719) 2012-06-27 15:22:06 -07:00