bors
8761b1fb16
auto merge of #7067 : brson/rust/notasktrans, r=graydon
2013-06-11 19:37:39 -07:00
bors
3f900dc7d1
auto merge of #7055 : thestinger/rust/iterator, r=catamorphism
...
This was a lot more painful than just changing `x.each` to `x.iter().advance` . I ran into my old friend #5898 and had to add underscores to some method names as a temporary workaround.
The borrow checker also had other ideas because rvalues aren't handled very well yet so temporary variables had to be added. However, storing the temporary in a variable led to dynamic `@mut` failures, so those had to be wrapped in blocks except where the scope ends immediately.
Anyway, the ugliness will be fixed as the compiler issues are fixed and this change will amount to `for x.each |x|` becoming `for x.iter |x|` and making all the iterator adaptors available.
I dropped the run-pass tests for `old_iter` because there's not much point in fixing a module that's on the way out in the next week or so.
2013-06-11 16:19:42 -07:00
bors
da9172af60
auto merge of #7040 : alexcrichton/rust/issue-6511-threadsafe-llvm, r=graydon
...
This is a reopening of #6570 , and almost fixes #6511 .
Note that this doesn't actually enable building a threadsafe LLVM, because that will require an LLVM rebuild which will be bundled with the upgrades in #6713 .
What this does do, however, is removes all thread-unsafe usage of LLVM from the compiler.
2013-06-11 13:46:54 -07:00
Brian Anderson
48c7bc17c6
rustc: Remove task type defs from trans
2013-06-11 12:36:42 -07:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Philipp Brüschweiler
3f62f9bccd
ty: several small fixes to is_instantiable
...
* Don't return early, so logging is not skipped
* Remove one allocation
* Indent the match statement correctly
2013-06-11 11:44:53 +02:00
bors
df5b0c040c
auto merge of #7046 : luqmana/rust/issue-7044, r=sanxiyn
...
Fixes #7044 .
2013-06-10 20:52:32 -07:00
Luqman Aden
a95232a59e
librustc: Better errors for duplicate definitions.
2013-06-10 18:00:57 -04:00
Luqman Aden
5a3e1cdaec
librustc: Don't allow newtype or unit-like structs to shadow other names in the value namespace.
2013-06-10 17:29:48 -04:00
Alex Crichton
5c5095d25e
Have JIT execution take ownership of the LLVMContextRef
...
Also stop leaking the ExecutionEngine created for jit code by forcibly disposing
of it after the JIT code has finished executing
2013-06-10 13:17:04 -07:00
Alex Crichton
779191cd4b
Remove all usage of the global LLVMContextRef
...
This allows parallel usage of the rustc library
2013-06-10 13:17:04 -07:00
Huon Wilson
e8782eeb63
fix tests, remove some warnings
2013-06-11 02:34:14 +10:00
Huon Wilson
838191c40b
std: replace str::{starts,ends}_with with the method.
2013-06-11 01:03:24 +10:00
Huon Wilson
248b6e38b5
std: replace str::substr with the method.
2013-06-11 00:52:47 +10:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
5a711ea7c3
clean-up unused import warnings
2013-06-10 23:15:01 +10:00
Huon Wilson
ec5a028ada
std: convert str::char_at* to methods.
2013-06-10 23:02:55 +10:00
Huon Wilson
1553874149
std: convert str::reserve* to methods, and methodise str::push_*.
2013-06-10 23:02:55 +10:00
Huon Wilson
a64e886e3c
std: remove str::contains in favour of the method
2013-06-10 23:02:55 +10:00
Huon Wilson
0cfc08d81e
std: convert character-based str::find_* to methods. Add .slice_{to,from} methods.
2013-06-10 23:02:54 +10:00
Huon Wilson
76fc9be5a1
std: convert each_split_str to an iterator
2013-06-10 23:02:54 +10:00
Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Alex Crichton
b6cccb3d81
Track the source of the type_target and value_target separately for ImportResolutions
2013-06-09 21:42:57 -07:00
Luqman Aden
618558a70f
librustc: Allow adding static fn's in multiple impl's.
2013-06-09 08:00:40 -04:00
bors
88c318d28c
auto merge of #7023 : thestinger/rust/vec, r=brson
2013-06-08 22:34:10 -07:00
Daniel Micay
de367157b5
remove deprecated vec::{is_empty, len} functions
2013-06-08 23:19:30 -04:00
bors
1f0c05ff74
auto merge of #7018 : bill-myers/rust/fix_7017, r=thestinger
...
Minimally fixes #7017 , we were overwriting the result and thus ignoring attributes before the last.
csearch::get_item_attrs and decoder::get_item_attrs should probably also be changed to each_item_attrs using the for protocol, but that's just a minor performance/style issue.
2013-06-08 19:16:11 -07:00
Bill Myers
90ec4228be
fix decoding of multiple attributes ( fixes #7017 )
...
We were just looking at the last because we were overwriting ret.
2013-06-09 02:36:31 +02:00
bors
470bf0dfb3
auto merge of #7016 : thestinger/rust/ptr, r=luqmana
2013-06-08 14:31:10 -07:00
bors
878a9b92eb
auto merge of #7004 : dotdash/rust/allocs, r=thestinger
...
This removes some unnecessary allocations in the lexer, the typechecker and the metadata decoder. Reduces the time spent in the parsing and typechecking passes by about 10% for me.
2013-06-08 13:37:10 -07:00
bors
4aa77198cb
auto merge of #6992 : Blei/rust/fix-autoderef-ice, r=catamorphism
...
Related to #5062 , but doesn't fix that one.
2013-06-08 12:40:15 -07:00
Daniel Micay
fe3ad0a204
rm some uses of to_mut_unsafe_ptr
2013-06-08 15:02:32 -04:00
Huon Wilson
98ba91f81b
remove unused import warnings
2013-06-09 02:22:23 +10:00
Huon Wilson
513d2292e5
std: remove foldr and alli methods in vec
2013-06-09 02:22:23 +10:00
Huon Wilson
ed299af625
std: remove fold[lr] in favour of iterators
2013-06-09 02:22:23 +10:00
Huon Wilson
65c7c58c8f
std: remove {all*,any*,count} in favour of iterators
2013-06-09 02:22:23 +10:00
Huon Wilson
ce4f63dcee
std: add reverse vec iterators, replace vec::each*_reverse.
2013-06-09 02:22:23 +10:00
Philipp Brüschweiler
a99ba1180d
rustc::regionck: fix ICE when getting signature of ty_err
...
Fixes #5062
2013-06-08 09:34:47 +02:00
Philipp Brüschweiler
f3f9db133a
rustc: Fix an ICE "Autoderef but type not derefable"
...
Related to #5062 (same error message), but that test case causes
a different ICE than mentioned there (even without this fix).
2013-06-08 09:34:32 +02:00
Björn Steinbrink
b65dc42b25
TypeChecker: Avoid unnecessary copies
2013-06-08 03:24:47 +02:00
Björn Steinbrink
96798f5e05
tydecode: Accept a plain borrowed pointer to the data
2013-06-08 03:24:47 +02:00
Philipp Brüschweiler
080a462050
rustc::typeck: fix array out of bounds
...
Fixes #6155
2013-06-07 22:09:01 +02:00
Daniel Micay
d945543ebf
Merge branch 'each-fn-kill' of https://github.com/huonw/rust into each-fn-kill
2013-06-07 14:43:02 -04:00
Huon Wilson
54d914a9a9
std: remove each[i]_mut functions, in favour of iterators.
2013-06-08 03:24:27 +10:00
Huon Wilson
bc81d279fa
rustc: Convert a fail! to a useful error message.
2013-06-08 01:46:49 +10:00
Huon Wilson
f661a15b2b
std: remove vec::each2 and vec::each2_mut in favour of iterators
2013-06-08 01:20:47 +10:00
bors
4abd83b18d
auto merge of #6985 : Aatch/rust/fixed-vec-6977, r=thestinger
...
This fixes #6977 . Negative counts don't make sense anyway.
2013-06-06 20:34:32 -07:00
James Miller
de27064d84
Disallow negative counts in repeat expressions
2013-06-07 12:30:44 +12:00
Michael Sullivan
8bbf83b62a
Clean up a handful of build warnings.
2013-06-06 12:14:41 -07:00
Philipp Brüschweiler
13df1198d5
infer: remove superfluous call to try()
2013-06-06 11:53:09 +02:00