Commit Graph

427 Commits

Author SHA1 Message Date
Tim Chevalier
ad9c54c631 Merge 2013-02-20 19:09:32 -08:00
Tim Chevalier
f823d83718 Fix vdef pattern 2013-02-20 18:45:50 -08:00
Tim Chevalier
a4403e5cb8 Fix flipped tuple that was causing all that pain 2013-02-20 18:45:50 -08:00
Tim Chevalier
0c3290a217 Merge 2013-02-20 18:45:50 -08:00
Luqman Aden
6282e5da67 librustc: tidy 2013-02-20 18:45:50 -08:00
Luqman Aden
cd82c4566b librustc: Get rid of structural records save for front/test.rs. 2013-02-20 18:45:50 -08:00
bors
8f8f0ec2c6 auto merge of #5043 : brson/rust/swap, r=brson
r?
2013-02-20 16:58:34 -08:00
Brian Anderson
423843e54b Don't perform swap when src == dst. #5041 2013-02-20 16:18:48 -08:00
bors
62f2b4943a auto merge of #5046 : sanxiyn/rust/struct-match, r=catamorphism
Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.

Fix #4849.
2013-02-20 16:08:36 -08:00
bors
db25210244 auto merge of #5044 : thestinger/rust/range, r=pcwalton
Closes #4924

There are some more `Load` calls that could use this, so it's not completely done yet.
2013-02-19 19:04:28 -08:00
Daniel Micay
fa6e3b49bf replace explicit loops with foldr 2013-02-19 21:20:07 -05:00
bors
b88e4f3b9f auto merge of #5039 : alexcrichton/rust/issue-4875, r=catamorphism
It looks like the type for the whole pattern wasn't being written back, so when privacy tried to look it up everything died.
2013-02-19 17:38:29 -08:00
Daniel Micay
12b43b274b add range assert when loading bools 2013-02-19 20:22:04 -05:00
Daniel Micay
0262e4b138 use range assert when loading enum discriminant
Closes #4924
2013-02-19 17:59:24 -05:00
Alex Crichton
cc3fbcee51 Fix for issue 4875 2013-02-19 17:35:02 -05:00
bors
1f956fc3b2 auto merge of #4999 : erickt/rust/incoming, r=brson
This patch series is doing a couple things with the ultimate goal of removing `#[allow(vecs_implicitly_copyable)]`, although I'm not quite there yet. The main change is passing around `@~str`s in most places, and using `ref`s in others. As far as I could tell, there are no performance changes with these patches, and all the tests pass on my mac.
2013-02-19 12:24:30 -08:00
Erick Tryzelaar
68746cd4fb librustc: change driver::session::Session::str_of to return @~str 2013-02-19 10:11:05 -08:00
Erick Tryzelaar
b90ccc9a38 librustc: minor cleanup 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
ae86c03af2 librustc: change check_item_non_camel_case_types to not copy 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
3c0eca7940 librustc: convert creader and cstore to use @~strs 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
a18e7d6656 librustc: minor cleanup 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
53951afe48 librustc: convert lint_dict to take @~strs as keys 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
04334c1ae0 librustc: convert LangItemsCollector::item_refs to take @~str as a key 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
de5fdaf934 convert ast::meta_items to take @~strs 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
a2b754788d convert syntax::attr to use @~strs 2013-02-19 10:02:51 -08:00
Seo Sanghyeon
a29023e9b2 Check type when struct is matched against enum-like pattern
Previously check always succeeded because struct type was derived from
the matched expression, not the matched pattern.
2013-02-20 02:44:02 +09:00
Kang Seonghoon
f513c567cb fix ICE after incorrect number of args in calls 2013-02-20 00:53:54 +09:00
bors
396f911925 auto merge of #5017 : catamorphism/rust/less-copy, r=catamorphism 2013-02-18 22:06:33 -08:00
bors
24603afc93 auto merge of #5010 : youknowone/rust/match_const_typecheck, r=catamorphism
Fix of issue #4968
2013-02-18 20:18:34 -08:00
bors
9ba2e65fd6 auto merge of #5004 : luqmana/rust/rename-use-import, r=catamorphism
Seems like my previous pull request got lost along the way somehow. So here it is updated.
2013-02-18 17:48:34 -08:00
Tim Chevalier
43dc67b74a rustc: Less copy in trans, rs=removing copies 2013-02-18 15:53:37 -08:00
Jeong YunWon
092b6114c1 add missing typecheck for const pattern match arm
Issue #4968
2013-02-19 00:56:02 +09:00
Luqman Aden
5b5ac331db Long lines. 2013-02-17 21:53:29 -05:00
Luqman Aden
0f09c106f0 libsyntax: Update view_item_use/import to reflect actual usage 2013-02-17 21:45:00 -05:00
Jed Davis
d009c6330b Make univariant enums act like structs, so that they're aligned correctly.
Consts of such enums are aligned correctly, so we could either misalign
them to match the type_of, or fix the type_of.  The latter seems like a
better idea.
2013-02-17 12:20:42 -08:00
Seth Pink
60bd4a5385 Removed more capture claueses. 2013-02-17 12:41:45 +10:00
Patrick Walton
548c0982ca librustc: Remove simplify_type and replace with sizing_type_of. rs=blocking-servo
`simplify_type` was bogus, as there was no way for it to handle enums
properly. It was also slow, because it created many Rust types at runtime. In
general creating Rust types during trans is a source of slowness, and I'd like
to avoid doing it as much as possible. (It is probably not possible to
eliminate it entirely, due to `subst`, but we should get rid of as much of it
as we can.) So this patch replaces `simplify_type` with `sizing_type_of`,
which creates a size-equivalent LLVM type directly without going through a
Rust type first.

Because this is causing an ICE in Servo, I'm rubber stamping it.
2013-02-16 10:20:52 -08:00
Patrick Walton
bb833ca0f0 librustc: Stop parsing impl Type : Trait and fix several declarations that slipped through. r=tjc 2013-02-15 16:59:56 -08:00
bors
566bcf2225 auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brson
Issue #3869
review? @nikomatsakis 

Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
Fix windows build error.  `buf` is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 13:54:49 -08:00
Luqman Aden
99b3c07b4e librustc: Get rid of move. 2013-02-15 02:49:55 -08:00
bors
9727008ed0 auto merge of #4944 : catamorphism/rust/xxx-to-fixme, r=catamorphism 2013-02-14 23:11:13 -08:00
Tim Chevalier
3201c6fe3f rustc: De-XXX resolve and borrowck...
and remove an un-needed hashmap from resolve
2013-02-14 23:08:18 -08:00
bors
af2f0ef088 auto merge of #4927 : sanxiyn/rust/remove-dvec, r=catamorphism 2013-02-14 17:23:18 -08:00
Nick Desaulniers
5d62a4a52e Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
2013-02-14 16:14:32 -08:00
Patrick Walton
9143688197 librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping 2013-02-14 14:44:12 -08:00
Daniel Micay
762ce323c0 stop applying noinline to glue code 2013-02-14 14:48:34 -05:00
Seo Sanghyeon
ae38935ff3 Remove DVec from check_const 2013-02-14 22:36:56 +09:00
bors
6efa3543a8 auto merge of #4922 : jbclements/rust/add-deriving-eq-to-asts, r=catamorphism
r?

Apply deriving_eq to the data structures in ast.rs, and get rid of the custom definitions of eq that were everywhere. resulting ast.rs is about 400 lines shorter.

Also: add a few test cases and a bunch of comments.

Also: change ast_ty_to_ty_cache to use node ids rather than ast::ty's. I believe this was a suggestion related to my changes, and it appears to pass all tests.

Also: tiny doc fix, remove references to crate keywords.
2013-02-13 18:49:29 -08:00
Nick Desaulniers
4445b38df2 Remove die!, raplace invocations with fail! Issue #4524 pt 3 2013-02-13 17:01:32 -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