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
Erick Tryzelaar
27e235b64a
libsyntax and librustc: minor cleanup
2013-02-19 10:02:51 -08:00
Erick Tryzelaar
1a5b8e4aba
libsyntax: change attr:get_attr_name to take a ref
2013-02-19 10:02:51 -08:00
Erick Tryzelaar
e6d84268fa
Change functions from taking ~str to taking &str
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
bors
1171a214a6
auto merge of #4979 : z0w0/rust/issue-1301, r=catamorphism
2013-02-18 13:50:36 -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
bors
9ea05a4d3e
auto merge of #4978 : z0w0/rust/issue-607, r=graydon
2013-02-16 22:39:29 -08:00
Zack Corr
0991437c3b
rustc: Don't copy in add_used_link_args
2013-02-17 14:59:04 +10:00
Seth Pink
60bd4a5385
Removed more capture claueses.
2013-02-17 12:41:45 +10:00
bors
945ac428b8
auto merge of #4977 : z0w0/rust/endianattr, r=catamorphism
...
```rust
#[cfg(target_endian = "little")]
fn something() { /* .. */ }
#[cfg(target_endian = "big")]
fn something() { /* .. */ }
```
2013-02-16 13:59:24 -08: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
Zack Corr
19eb225bc2
Support link_args at the crate level. Closes #1301
2013-02-17 01:21:56 +10:00
Zack Corr
fe9f1d155a
syntax: Implement recursive sorting of meta items. Closes #607
2013-02-17 00:31:57 +10:00
Zack Corr
0e83102219
Add target_endian crate cfg. Closes #4367
2013-02-16 22:42:00 +10:00
Zack Corr
7079441843
rustpkg: Add preliminary imperative API support
2013-02-15 18:04:10 -08:00
Zack Corr
621c791ded
Rename cargo to rustpkg and start over fresh
2013-02-15 18:04:10 -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
178882c98f
tests/tutorials: Get rid of move
.
2013-02-15 02:49:55 -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