Erick Tryzelaar
6fcf2ee8e3
std: Transform.find_ -> .find
2013-08-10 07:33:22 -07:00
Erick Tryzelaar
1db62d8311
std: Iterator.chain_ -> .chain
2013-08-10 07:33:21 -07:00
Erick Tryzelaar
68f40d215e
std: Rename Iterator.transform -> .map
...
cc #5898
2013-08-10 07:33:21 -07:00
Marvin Löbel
0ac7a219f0
Updated std::Option, std::Either and std::Result
...
- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05 22:42:21 +02:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Michael Woerister
8a329770b6
New naming convention for ast::{node_id, local_crate, crate_node_id, blk_check_mode, ty_field, ty_method}
2013-07-29 16:16:48 +02:00
Michael Sullivan
79f8a7fee5
Properly track and export information about vtables for impls in metadata.
...
Partially rework how vtables are handled in default method calls.
Closes #7460 .
2013-07-23 17:06:33 -07:00
Michael Sullivan
585e283769
Add provided method information to ty::Method. Get rid of ProvidedMethodSource.
2013-07-18 13:56:14 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Patrick Walton
b4e674f6e6
librustc: Add a lint mode for unnecessary copy
and remove a bunch of them.
2013-07-17 14:56:42 -07:00
Michael Sullivan
1bbb434880
Get static default methods working in the non-cross-crate case. Work on #7569 .
2013-07-11 15:51:09 -07:00
Michael Sullivan
2b89b437fb
Normalize self types for monomorphization.
2013-07-11 15:51:09 -07:00
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -04:00
bors
b055a10662
auto merge of #7545 : msullivan/rust/default-methods, r=catamorphism
...
r?
2013-07-04 13:49:53 -07:00
bors
e07e9bbf36
auto merge of #7543 : sanxiyn/rust/newtype-immediates, r=catamorphism
...
Fix #6612 . Rebase of #6725 . Fixed an additional bug and added a test.
2013-07-03 23:31:56 -07:00
Michael Sullivan
419a14772a
Fix make_mono_id to take into account self types. Closes #7536 .
2013-07-03 09:59:45 -07:00
Seo Sanghyeon
fd19289108
Classify newtype structs S(T) as immediates if T is an immediate
2013-07-01 13:02:14 +09:00
Huon Wilson
c0a20d2929
Remove vec::{map, mapi, zip_map} and the methods, except for .map, since this
...
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
2013-06-30 21:59:44 +10:00
Corey Richardson
1662bd371c
Great renaming: propagate throughout the rest of the codebase
2013-06-29 11:20:02 -04:00
Michael Sullivan
c05165bf93
Drop the impl_id field from fn_ctxt.
2013-06-28 18:09:02 -07:00
Michael Sullivan
5943118728
Drop an unused field from param_substs.
2013-06-28 18:09:02 -07:00
Michael Sullivan
649b26f7c6
Rework vtable_res to not be flattened. It is now a list of the resolutions for each param.
2013-06-28 16:12:08 -07:00
Michael Sullivan
817f98085f
Make calling methods parameterized on the trait work from default methods.
...
This is done by adding a new notion of "vtable_self".
We do not yet properly handle super traits.
Closes #7183 .
2013-06-28 16:12:08 -07:00
James Miller
a897a9ab9f
Remove useless namegen thunk
2013-06-28 18:00:20 +12:00
Michael Sullivan
13e5f0ebdf
Remove some essentially dead code in method handling.
2013-06-25 10:17:33 -07:00
Ben Blum
ce857e3d60
Parse and typecheck (not kindcheck) bounds on trait paths.
2013-06-23 14:40:14 -04:00
Daniel Micay
d2e9912aea
vec: remove BaseIter implementation
...
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04:00
James Miller
e3ef7504e9
Fix merge fallout
2013-06-22 13:41:52 +12:00
James Miller
048ed1486f
Move count-llvm-insn code into task-local storage
2013-06-22 12:38:40 +12:00
Daniel Micay
06bec77faf
replace vec::find with the IteratorUtil method
2013-06-21 03:24:03 -04:00
Daniel Micay
49c74524e2
vec: rm old_iter implementations, except BaseIter
...
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.
This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04:00
James Miller
cc908b772c
Remove @-fields from CrateContext
...
Remove all the explicit @mut-fields from CrateContext, though many
fields are still @-ptrs.
This required changing every single function call that explicitly
took a @CrateContext, so I took advantage and changed as many as I
could get away with to &-ptrs or &mut ptrs.
2013-06-16 09:20:40 +12:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Huon Wilson
096f6f56a8
Use @str instead of @~str in libsyntax and librustc. Fixes #5048 .
...
This almost removes the StringRef wrapper, since all strings are
Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts
several things to be &'static str (the lint table and the intrinsics
table).
There are many instances of .to_managed(), unfortunately.
2013-06-13 10:20:52 +10:00
Michael Sullivan
36e3d64c3e
Fix a lot of the handling of default methods and type parameters. Closes #4099 , #4102 .
2013-06-12 13:50:45 -07:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Huon Wilson
65c7c58c8f
std: remove {all*,any*,count} in favour of iterators
2013-06-09 02:22:23 +10:00
Jed Davis
0c9510ac38
Use ABI alignment, not "preferred" alignment, to unify monomorphizations.
...
See the comment in the added test case for details.
2013-06-04 00:18:48 -07:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Patrick Walton
f3723cf7c4
libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra
2013-05-22 21:57:07 -07:00
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
Tim Chevalier
f21fb3aff5
rustc: Cleaning up bad copies and other XXXes
2013-05-17 21:41:54 -07:00
Niko Matsakis
035c01af93
Add BuiltinBounds to closure type: parse and handle subtyping,
...
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16 14:21:02 -04:00
bors
e9d0018abf
auto merge of #6356 : dotdash/rust/strinterner, r=pcwalton
...
&str can be turned into @~str on demand, using to_owned(), so for
strings, we can create a specialized interner that accepts &str for
intern() and find() but stores and returns @~str.
2013-05-10 01:55:54 -07:00
Niko Matsakis
dc2ca9d883
Refactor representation of bounds to separate out BuiltinBounds into
...
its own type. Use a bitset to represent built-in bounds. There
are several places in the language where only builtin bounds (aka kinds)
will be accepted, e.g. on closures, destructor type parameters perhaps,
and on trait types.
2013-05-09 11:39:06 -04:00
Björn Steinbrink
1393c3a3f4
Use a specialized string interner to reduce the need for owned strings
...
&str can be turned into @~str on demand, using to_owned(), so for
strings, we can create a specialized interner that accepts &str for
intern() and find() but stores and returns @~str.
2013-05-09 14:40:19 +02:00
Niko Matsakis
4300d4d2fa
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
...
Conflicts:
src/libcore/core.rc
src/libcore/hashmap.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/num.rs
src/libcore/num/strconv.rs
src/libcore/num/uint-template.rs
src/libcore/ops.rs
src/libcore/os.rs
src/libcore/prelude.rs
src/libcore/rt/mod.rs
src/libcore/unstable/lang.rs
src/librustc/driver/session.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans.rs
src/librustc/middle/borrowck/loan.rs
src/librustc/middle/borrowck/preserve.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/region.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/inline.rs
src/librustc/middle/trans/reachable.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/util/ppaux.rs
src/libstd/arena.rs
src/libstd/ebml.rs
src/libstd/json.rs
src/libstd/serialize.rs
src/libstd/std.rc
src/libsyntax/ast_map.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail/borrowck-uniq-via-box.rs
src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs
src/test/run-pass/borrowck-nested-calls.rs
2013-05-05 15:11:04 -04:00
Niko Matsakis
0b0b8018a6
add warning for #6248 and remove instances of it
2013-05-05 12:17:59 -04:00
Jeong YunWon
35b91e2f73
Use static strings
2013-05-03 01:41:09 +09:00