bors
ad5bfd600d
auto merge of #6387 : brson/rust/unstable, r=brson
...
r? @pcwalton
* Move `SharedMutableState`, `LittleLock`, and `Exclusive` from `core::unstable` to `core::unstable::sync`
* Modernize the `SharedMutableState` interface with methods
* Rename `SharedMutableState` to `UnsafeAtomicRcBox` to match `RcBox`.
2013-05-13 14:49:48 -07:00
Brian Anderson
fa1d0477ed
core: Move locks, atomic rc to unstable::sync
2013-05-13 12:13:56 -07:00
Patrick Walton
06ef889cdc
libsyntax: Remove extern mod foo { ... }
from the language.
2013-05-12 16:33:15 -07:00
Corey Richardson
a279d65102
clean up the last bit of warnings
2013-05-11 20:36:47 -07:00
bors
957251817b
auto merge of #6389 : sonwow/rust/issue-3356, r=bstrie
...
Fix for #3356
2013-05-11 12:55:49 -07:00
bors
3e0400fb86
auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwalton
...
Closes #6183 .
The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout.
The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10 17:56:02 -07:00
Youngsoo Son
24ef88cee9
renamed str::from_slice to str::to_owned
2013-05-10 20:08:56 +09:00
Alex Crichton
28256052a4
core: Use the new for
protocol
2013-05-10 02:46:18 -04:00
Youngsoo Son
c8e93edf55
Move core::task::local_data to core::local_data
2013-05-10 11:42:45 +09:00
Youngmin Yoo
9a292b3da5
libcore: rename vec::each(variable) to variable.each
2013-05-09 14:17:18 +09:00
Patrick Walton
16a0125e41
libcore: Fix tests.
2013-05-08 17:04:01 -07:00
Patrick Walton
2961997f16
libcore: Remove mutable fields from os and ptr
2013-05-08 17:03:58 -07: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
Tim Chevalier
4d4cabff9e
rustpkg: Implement install command
...
The install command should work now, though it only installs
in-place (anything else has to wait until I implement RUST_PATH).
Also including:
core: Add remove_directory_recursive, change copy_file
Make copy_file preserve permissions, and add a remove_directory_recursive
function.
2013-05-03 16:06:07 -07:00
gareth
544ac620ba
Convert most of rust_run_program.cpp to rust (issue #2674 ).
2013-05-02 19:26:52 +01:00
Jesse Luehrs
685baed34e
add a higher level glob() function to os
...
this could probably use expansion - it just uses all of the default
options, which is usually what we want, but not always. maybe add a
separate function that takes more options?
2013-05-01 16:49:58 -07:00
Tim Chevalier
782e06e0e3
core/std: Fix race condition in os::mkdir_recursive tests
...
Added a change_dir_locked function to os, and use it in the
mkdir_recursive tests so that the tests don't clobber each other's
directory changes.
2013-04-30 17:58:24 -07:00
Niko Matsakis
418f991118
allover: numerous unused muts etc
2013-04-30 14:10:21 -04:00
Tim Chevalier
d045ce7b87
core: Use a better termination condition in os::mkdir_recursive
...
Instead of checking whether the parent is "." or "/", check the
number of components.
Also, more tests.
2013-04-28 21:25:35 -07:00
Tim Chevalier
848641fcb5
core: Move mkdir_recursive from rustpkg into core::os
...
mkdir_recursive creates a directory as well as any of its
parent directories that don't exist already. Seems like a useful
thing to have in core.
2013-04-26 15:51:22 -07:00
Tim Chevalier
08109aa0ad
core: Comments only -- move FIXME to correct location
2013-04-24 17:51:30 -07:00
Huon Wilson
6c0a7c7b7d
libcore: remove @Rng from rand, and use traits instead.
...
Also, rename RandRes -> IsaacRng, and make the constructors static
methods.
2013-04-24 22:34:10 +10:00
gareth
62befac51f
Cleanup some mistakes made during rebasing/merging.
2013-04-23 21:23:16 +01:00
gareth
690120d6bc
Remove os::waitpid because:
...
- The return value meant different things on different
platforms (on windows, it was the exit code, on unix it was
the status information returned from waitpid).
- It was undocumented.
- There also exists run::waitpid, which does much the same
thing but has a more consistent return value and also some
documentation.
2013-04-23 21:23:16 +01:00
gareth
91aeecf7e3
Fix issue #5976 - HANDLE leaks and undefined/bad behavour
...
on windows.
2013-04-23 21:23:15 +01:00
Matthijs Hofstra
51a68eb9b1
Replaced many instances of reinterpret_cast with transmute
2013-04-20 22:05:50 +02:00
Niko Matsakis
6965fe4bce
Add AbiSet and integrate it into the AST.
...
I believe this patch incorporates all expected syntax changes from extern
function reform (#3678 ). You can now write things like:
extern "<abi>" fn foo(s: S) -> T { ... }
extern "<abi>" mod { ... }
extern "<abi>" fn(S) -> T
The ABI for foreign functions is taken from this syntax (rather than from an
annotation). We support the full ABI specification I described on the mailing
list. The correct ABI is chosen based on the target architecture.
Calls by pointer to C functions are not yet supported, and the Rust type of
crust fns is still *u8.
2013-03-29 18:36:20 -07:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
Patrick Walton
0a4d0f37ca
librustc: Enforce that extern mod
directives come first, then use
directives, then items.
...
Resolve them in this order as well.
2013-03-26 21:30:17 -07:00
Daniel Micay
34c5a09ce3
option: rm functions that duplicate methods
2013-03-26 22:44:40 -04:00
Marvin Löbel
b9de2b5787
Switched over a bunch of splitting funktions to non-allocating iterators
2013-03-26 14:59:17 +01:00
Patrick Walton
85c9fc6f8f
librustc: Remove the const
declaration form everywhere
2013-03-22 22:24:35 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Patrick Walton
b1c699815d
librustc: Don't accept as Trait
anymore; fix all occurrences of it.
2013-03-13 20:07:09 -07:00
Brian Anderson
82f190355b
Remove uses of log
2013-03-11 23:19:42 -07:00
Jeff Olson
3aa92a91c9
core: convert asserts to fail_unless!
2013-03-11 15:38:55 -07:00
Jeff Olson
cf82360e72
core: formatting appeasement
2013-03-11 15:38:55 -07:00
Jeff Olson
a04ba76f8e
core: fix broken tests on windows
2013-03-11 15:38:55 -07:00
Jeff Olson
25c3c363a8
core: change import of exchange_alloc for win32 os::_list_dir
2013-03-11 15:38:55 -07:00
Jeff Olson
a69a2acfba
rt/core: port os::list_dir to rust ref #4812
2013-03-11 15:38:55 -07:00
Jeff Olson
53db6c7e2a
core: rt/core: impl os::env() in rust ref #4812
2013-03-11 15:38:55 -07:00
Jeff Olson
4bc26ce575
rt/core: impl os::getcwd() in rust ref #4812
2013-03-11 15:38:55 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Patrick Walton
d661711cc2
test: Fix tests.
2013-03-07 22:37:58 -08:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
Patrick Walton
fd271adc75
libcore: Remove extern mod { ... }
from libcore. rs=deexterning
2013-03-07 22:32:51 -08:00
Niko Matsakis
3168fe06ff
Add manual &self/ and &static/ and /&self declarations that
...
are currently inferred. New rules are coming that will require
them to be explicit. All add some explicit self declarations.
2013-03-06 15:12:57 -05:00
bors
eddefbc893
auto merge of #5212 : thestinger/rust/iter, r=graydon
...
A small step towards fixing #2827
2013-03-05 02:06:50 -08:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00