Patrick Walton
9143688197
librustc: Replace impl Type : Trait
with impl Trait for Type
. rs=implflipping
2013-02-14 14:44:12 -08:00
Patrick Walton
216e85fadf
libcore: Move the numeric operations out of Num. r=brson
...
Sadly I could not use trait inheritance due to a type parameter substitution
bug.
2013-02-14 08:14:01 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
bors
c51ecc3223
auto merge of #4884 : pcwalton/rust/pretty-print-new-impl-syntax, r=pcwalton
...
r? @brson
2013-02-13 15:49:01 -08:00
Patrick Walton
754718c910
libsyntax: Pretty print using the new impl syntax. r=brson
2013-02-13 15:23:48 -08:00
bors
d5bf3b85d1
auto merge of #4908 : bstrie/rust/rimov3, r=pcwalton
...
This patch finishes removing inner vector mutability from the vast majority of the compiler. Exceptions:
* core::dvec: ideally this entire type will be able to be replaced by `~[]`, but Niko asked me to hold off on removing Dvecs until he makes some fixes to borrowed pointers.
* liveness: liveness.rs is an impenetrable neutron star of deprecated semantics.
* compile-fail: I'm not sure if a lot of these tests are testing inner mutability or mutability in general. I figure that RIMOVing this folder should wait until this syntax is removed from the parser.
I also took this chance to remove many of the inner-mutability-related functions from core::vec, or as many uses of those functions as possible where still necessary. consume_mut and append_mut have been axed. cast_to_mut and cast_from_mut are still needed in a few places.
2013-02-13 15:09:07 -08:00
Graydon Hoare
e5aa399e0d
rustc and std: teach about #[bench], modernize to use quote_expr! some.
2013-02-13 11:46:25 -08:00
Ben Striegel
e6c82c0375
RIMOV core::vec
...
Also remove as many uses as possible of vec::cast_to_mut and
cast_from_mut
2013-02-13 12:48:24 -05:00
Patrick Walton
e07623d70b
librustc: Make monomorphic newtype structs work cross-crate
2013-02-13 09:47:20 -08:00
bors
6016214101
auto merge of #4900 : luqmana/rust/core_os_errors, r=graydon
...
Rewrote the last pull request (#4859 ) to not require on llvm for core.
Also fixes #2269 .
2013-02-12 21:27:22 -08:00
bors
6727c6fb56
auto merge of #4881 : bjz/rust/incoming, r=catamorphism
2013-02-12 16:22:58 -08:00
Graydon Hoare
1d82d8dd5d
Revert "librustc: Make monomorphic newtype structs work cross-crate"
...
This reverts commit a8f039a085
.
2013-02-12 09:02:17 -08:00
Luqman Aden
70185fdcc2
rt: remove last_os_error and adjust tests.
2013-02-11 23:49:49 -05:00
Patrick Walton
a8f039a085
librustc: Make monomorphic newtype structs work cross-crate
2013-02-11 20:09:11 -08:00
Mikko Perttunen
ca030b4fc8
Update copyright years
2013-02-11 21:02:36 +02:00
Mikko Perttunen
d48bc263b5
Add test for using line! in a macro
2013-02-11 20:26:40 +02:00
Brendan Zabarauskas
48b2141b83
Add NumCast trait for generic numeric type casts
2013-02-11 12:33:05 +11:00
bors
9d7014e55c
auto merge of #4861 : sethpink/rust/incoming, r=catamorphism
...
Fix for issue #4830 .
2013-02-09 18:37:02 -08:00
bors
d90abd5879
auto merge of #4848 : nikomatsakis/rust/issue-4821-bad-kind-computation, r=catamorphism
...
...ear
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
r? @catamorphism
2013-02-09 10:20:55 -08:00
Seth Pink
8ebdb3d0ab
Issue #4830 fix
2013-02-09 23:00:55 +10:00
Niko Matsakis
a380df809c
Fix subtle error in caching during kind computation that could cause linear
...
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
2013-02-08 07:20:39 -08:00
bors
9b4fa844d8
auto merge of #4835 : thestinger/rust/iterator, r=graydon
...
This adds a `BaseIter` impl to `PriorityQueue`, `TreeMap`, `LinearMap` and `SmallIntMap`, and introduces a `ReverseIter` trait + implementations for `TreeMap`, `TreeSet` and `SmallIntMap`.
2013-02-07 21:37:59 -08:00
Daniel Micay
83270d2d79
rm each method from the Map trait
...
the map types should implement BaseIter instead
2013-02-07 22:04:35 -05:00
Jed Davis
e89d9853a6
Fix vector indexing in consts so it works with the enum vector const fix.
2013-02-07 18:31:12 -08:00
Jed Davis
de8dc02634
Make tuple-like structs containing enums work as constants.
2013-02-07 18:31:12 -08:00
Jed Davis
30aae3d910
Fix const enum type issues for structs.
2013-02-07 18:31:12 -08:00
Jed Davis
bbb1202528
Add a test for vstore, which already works
2013-02-07 18:31:08 -08:00
Jed Davis
29b99669dc
Fix pointer consts to work with enums
2013-02-07 18:28:31 -08:00
Jed Davis
9ad616a102
Make vectors of enums work as constants
2013-02-07 18:28:11 -08:00
Jed Davis
6cdc283415
Also need to pad out "C-like" enum consts (paths as well as calls).
2013-02-07 17:57:02 -08:00
Jed Davis
877fc8d891
Pad out enum consts to the expected size; makes enums in tuples work.
...
This is wasted space if the const is just an enum, but optimizing that
case without breaking everything else is an issue that can be addressed
separately.
2013-02-07 17:57:02 -08:00
Brian Anderson
6e9298ab88
Merge pull request #4619 from brson/exchange
...
Some work on freestanding Rust: foreign calls, exchange allocator
2013-02-07 13:46:10 -08:00
bors
37a610a7d9
auto merge of #4831 : bjz/rust/incoming, r=pcwalton
...
This is useful for comparing more complex types that include floats.
2013-02-07 08:32:09 -08:00
Brendan Zabarauskas
7651100ec1
Fix broken tests
2013-02-08 02:41:23 +11:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00
Brian Anderson
e91040c704
Make foreign calls work outside of tasks. #4451
2013-02-06 14:27:34 -08:00
Patrick Walton
801f3225b2
oldmap: use &K instead of K in find and get
...
This reverts commit a4250a96fd
.
This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd
Revert "oldmap: use &K instead of K in find and get"
...
This reverts commit 8e643525d4
.
2013-02-05 14:30:53 -08:00
Tim Chevalier
33e2c979ce
Merge branch 'incoming' into removing
2013-02-05 10:33:35 -08:00
Tim Chevalier
2dcb3ed745
Merge
2013-02-05 10:33:28 -08:00
bors
bffe3088c7
auto merge of pull req #4777 from thestinger/rust, r=graydon
2013-02-04 17:24:40 -08:00
Brian Anderson
e08a805b30
Merge remote-tracking branch 'bstrie/rimov' into incoming
...
Conflicts:
src/libsyntax/parse/parser.rs
src/test/bench/graph500-bfs.rs
src/test/bench/sudoku.rs
src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
src/test/run-pass/empty-mutable-vec.rs
src/test/run-pass/foreach-nested.rs
src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00
Brian Anderson
27e1ac5bb9
Merge pull request #4684 from erickt/incoming
...
core: convert ToStr::to_str to take explicit &self
2013-02-04 10:15:02 -08:00
Brian Anderson
750f246ad5
xfail-faist impl_privace_xc_2.rs
2013-02-04 09:56:50 -08:00
Erick Tryzelaar
9adfa59d8e
core: convert ToStr::to_str to take explicit &self
2013-02-03 20:47:26 -08:00
Daniel Micay
8e643525d4
oldmap: use &K instead of K in find and get
2013-02-03 23:30:56 -05:00
Brian Anderson
9556629da2
xfail-fast run-pass/impl-privacy-xc-1.rs
2013-02-03 19:09:52 -08:00
Brian Anderson
3b396d17d6
Merge remote-tracking branch 'thestinger/old_map' into incoming
...
Conflicts:
src/test/bench/core-map.rs
2013-02-03 17:56:49 -08:00
Patrick Walton
04eb9b4eb0
librustc: Fix bugs regarding to impl privacy. rs=bugfix
2013-02-03 17:50:27 -08:00
Marvin Löbel
af4972f3ce
Fixed fmt!
, tests, doc-tests.
2013-02-03 15:37:25 -08:00