]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agorustc: Add --target-cpu flag to select a more specific processor instead of the defau...
Luqman Aden [Fri, 9 Aug 2013 02:16:00 +0000 (22:16 -0400)]
rustc: Add --target-cpu flag to select a more specific processor instead of the default, 'generic'.

10 years agoauto merge of #8327 : sstewartgallus/rust/factor_out_waitqueue, r=bblum
bors [Sat, 10 Aug 2013 14:47:14 +0000 (07:47 -0700)]
auto merge of #8327 : sstewartgallus/rust/factor_out_waitqueue, r=bblum

I'm a bit disappointed that I couldn't figure out how to factor out more of the code implementing `extra::sync` but I feel this is an okay start. Also I added some documentation explaining that `WaitQueue` isn't thread safe, and needs an exclusive lock.

@bblum

10 years agoauto merge of #8270 : dotdash/rust/ret_alloca_elim, r=pcwalton
bors [Sat, 10 Aug 2013 11:44:13 +0000 (04:44 -0700)]
auto merge of #8270 : dotdash/rust/ret_alloca_elim, r=pcwalton

When there is only a single store to the ret slot that dominates the
load that gets the value for the "ret" instruction, we can elide the
ret slot and directly return the operand of the dominating store
instruction. This is the same thing that clang does, except for a
special case that doesn't seem to affect us.

Fixes #8238

10 years agoElide unnecessary ret slot allocas
Björn Steinbrink [Sun, 28 Jul 2013 14:40:35 +0000 (16:40 +0200)]
Elide unnecessary ret slot allocas

When there is only a single store to the ret slot that dominates the
load that gets the value for the "ret" instruction, we can elide the
ret slot and directly return the operand of the dominating store
instruction. This is the same thing that clang does, except for a
special case that doesn't seem to affect us.

Fixes #8238

10 years agoauto merge of #8425 : dim-an/rust/increase-stack-size, r=brson
bors [Sat, 10 Aug 2013 08:20:14 +0000 (01:20 -0700)]
auto merge of #8425 : dim-an/rust/increase-stack-size, r=brson

10 years agoauto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=erickt
bors [Sat, 10 Aug 2013 04:56:17 +0000 (21:56 -0700)]
auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=erickt

This PR fixes #7235 and #3371, which removes trailing nulls from `str` types. Instead, it replaces the creation of c strings with a new type, `std::c_str::CString`, which wraps a malloced byte array, and respects:

*  No interior nulls
* Ends with a trailing null

10 years agoMerge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls
Erick Tryzelaar [Sat, 10 Aug 2013 01:48:01 +0000 (18:48 -0700)]
Merge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls

10 years agoauto merge of #8387 : brson/rust/nooldrt, r=brson
bors [Sat, 10 Aug 2013 01:41:13 +0000 (18:41 -0700)]
auto merge of #8387 : brson/rust/nooldrt, r=brson

10 years agoRemove the C++ runtime. Sayonara
Brian Anderson [Thu, 1 Aug 2013 06:12:20 +0000 (23:12 -0700)]
Remove the C++ runtime. Sayonara

10 years agoIncrease system stack size.
Dmitry Ermolov [Fri, 9 Aug 2013 23:37:39 +0000 (03:37 +0400)]
Increase system stack size.

10 years agoauto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphism
bors [Fri, 9 Aug 2013 23:17:10 +0000 (16:17 -0700)]
auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphism

r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).

10 years agorustpkg: Simplify the PkgId struct
Tim Chevalier [Fri, 2 Aug 2013 23:59:58 +0000 (16:59 -0700)]
rustpkg: Simplify the PkgId struct

Get rid of special cases for names beginning with "rust-" or
containing hyphens, and just store a Path in a package ID. The Rust-identifier
for the crate is none of rustpkg's business.

10 years agostd/rustc/rustpkg/syntax: Support the `extern mod = ...` form
Tim Chevalier [Wed, 31 Jul 2013 20:47:32 +0000 (13:47 -0700)]
std/rustc/rustpkg/syntax: Support the `extern mod = ...` form

This commit allows you to write:

 extern mod x = "a/b/c";

which means rustc will search in the RUST_PATH for a package with
ID a/b/c, and bind it to the name `x` if it's found.

Incidentally, move get_relative_to from back::rpath into std::path

10 years agorustpkg: another fix for windows
Erick Tryzelaar [Fri, 9 Aug 2013 21:06:03 +0000 (14:06 -0700)]
rustpkg: another fix for windows

10 years agoauto merge of #8415 : brson/rust/newrt-local-heap-perf, r=pcwalton,brson
bors [Fri, 9 Aug 2013 20:53:08 +0000 (13:53 -0700)]
auto merge of #8415 : brson/rust/newrt-local-heap-perf, r=pcwalton,brson

Mostly optimizing TLS accesses to bring local heap allocation performance
closer to that of oldsched. It's not completely at parity but removing the
branches involved in supporting oldsched and optimizing pthread_get/setspecific
to instead use our dedicated TCB slot will probably make up for it.

10 years agostd: more windows fixes to os.rs and run.rs
Erick Tryzelaar [Fri, 9 Aug 2013 18:13:26 +0000 (11:13 -0700)]
std: more windows fixes to os.rs and run.rs

10 years agoauto merge of #8369 : yichoi/rust/arm-test, r=sanxiyn
bors [Fri, 9 Aug 2013 17:59:08 +0000 (10:59 -0700)]
auto merge of #8369 : yichoi/rust/arm-test, r=sanxiyn

fix some part of test code to pass make check on ARM Android

10 years agoauto merge of #8352 : stepancheg/rust/ipv6-to-str, r=luqmana
bors [Fri, 9 Aug 2013 15:17:04 +0000 (08:17 -0700)]
auto merge of #8352 : stepancheg/rust/ipv6-to-str, r=luqmana

Reported by @luqmana

10 years agoauto merge of #8362 : sfackler/rust/env, r=alexcrichton
bors [Fri, 9 Aug 2013 12:35:06 +0000 (05:35 -0700)]
auto merge of #8362 : sfackler/rust/env, r=alexcrichton

env! aborts compilation of the specified environment variable is not
defined and takes an optional second argument containing a custom
error message. option_env! creates an Option<&'static str> containing
the value of the environment variable.

There are no run-pass tests that check the behavior when the environment
variable is defined since the test framework doesn't support setting
environment variables at compile time as opposed to runtime. However,
both env! and option_env! are used inside of rustc itself, which should
act as a sufficient test.

Fixes #2248.

10 years agoFix Ipv6Addr to_str for ::1:x.x.x.x addresses
Stepan Koltsov [Fri, 9 Aug 2013 09:53:28 +0000 (13:53 +0400)]
Fix Ipv6Addr to_str for ::1:x.x.x.x addresses

Reported by luqmana@

10 years agoauto merge of #8361 : alexcrichton/rust/fix-node-hashes-in-crates, r=thestinger
bors [Fri, 9 Aug 2013 09:53:08 +0000 (02:53 -0700)]
auto merge of #8361 : alexcrichton/rust/fix-node-hashes-in-crates, r=thestinger

When running rusti 32-bit tests from a 64-bit host, these errors came up frequently. My best idea as to what was happening is:

1. First, if you hash the same `int` value on 32-bit and 64-bit, you will get two different hashes.
2. In a cross-compile situation, let's say x86_64 is building an i686 library, all of the hashes will be 64-bit hashes.
3. Then let's say you use the i686 libraries and then attempt to link against the same i686 libraries, because you're calculating hashes with a 32-bit int instead of a 64-bit one, you'll have different hashes and you won't be able to find items in the metadata (the items were generated with a 64-bit int).

This patch changes the items to always be hashed as an `i64` to preserve the hash value across architectures. Here's a nice before/after for this patch of the state of rusti tests

```
host   target  before  after
64     64      yes     yes
64     32      no      no (llvm assertion)
32     64      no      yes
32     32      no      no (llvm assertion)
```

Basically one case started working, but currently when the target is 32-bit LLVM is having a lot of problems generating code. That's another separate issue though.

10 years agostd: Fix perf of local allocations in newsched
Brian Anderson [Fri, 9 Aug 2013 08:15:31 +0000 (01:15 -0700)]
std: Fix perf of local allocations in newsched

Mostly optimizing TLS accesses to bring local heap allocation performance
closer to that of oldsched. It's not completely at parity but removing the
branches involved in supporting oldsched and optimizing pthread_get/setspecific
to instead use our dedicated TCB slot will probably make up for it.

10 years agoauto merge of #8357 : omasanori/rust/cleanup, r=alexcrichton
bors [Fri, 9 Aug 2013 07:17:06 +0000 (00:17 -0700)]
auto merge of #8357 : omasanori/rust/cleanup, r=alexcrichton

I feel it's time to eliminate them (and add some testcases.)

10 years agoRemove redundant Ord method impls.
OGINO Masanori [Thu, 8 Aug 2013 01:03:34 +0000 (10:03 +0900)]
Remove redundant Ord method impls.

Basically, generic containers should not use the default methods since a
type of elements may not guarantees total order. str could use them
since u8's Ord guarantees total order. Floating point numbers are also
broken with the default methods because of NaN. Thanks for @thestinger.

Timespec also guarantees total order AIUI. I'm unsure whether
extra::semver::Identifier does so I left it alone. Proof needed.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoauto merge of #8350 : dim-an/rust/fix-struct-match, r=pcwalton
bors [Fri, 9 Aug 2013 04:41:05 +0000 (21:41 -0700)]
auto merge of #8350 : dim-an/rust/fix-struct-match, r=pcwalton

Code that collects fields in struct-like patterns used to ignore
wildcard patterns like `Foo{_}`. But `enter_defaults` considered
struct-like patterns as default in order to overcome this
(accoring to my understanding of situation).

However such behaviour caused code like this:
```
enum E {
    Foo{f: int},
    Bar
}
let e = Bar;
match e {
    Foo{f: _f} => { /* do something (1) */ }
    _ => { /* do something (2) */ }
}
```
consider pattern `Foo{f: _f}` as default. That caused inproper behaviour
and even segfaults while trying to destruct `Bar` as `Foo{f: _f}`.
Issues: #5625 , #5530.

This patch fixes `collect_record_or_struct_fields` to split cases of
single wildcard struct-like pattern and no struct-like pattern at all.
Former case resolved with `enter_rec_or_struct` (and not with
`enter_defaults`).

Closes #5625.
Closes #5530.

10 years agoIsolate common wait_end logic
Steven Stewart-Gallus [Fri, 9 Aug 2013 02:33:34 +0000 (19:33 -0700)]
Isolate common wait_end logic

10 years agoMerge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls
Erick Tryzelaar [Fri, 9 Aug 2013 02:27:03 +0000 (19:27 -0700)]
Merge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls

10 years agoauto merge of #8336 : stepancheg/rust/socket-addr-from-str, r=brson
bors [Fri, 9 Aug 2013 02:08:02 +0000 (19:08 -0700)]
auto merge of #8336 : stepancheg/rust/socket-addr-from-str, r=brson

FromStr implemented from scratch.

It is overengineered a bit, however.

Old implementation handles errors by fail!()-ing. And it has bugs, like it accepts `127.0.0.1::127.0.0.1` as IPv6 address, and does not handle all ipv4-in-ipv6 schemes. So I decided to implement parser from scratch.

10 years agoauto merge of #8356 : toddaaro/rust/ws, r=brson
bors [Thu, 8 Aug 2013 23:32:02 +0000 (16:32 -0700)]
auto merge of #8356 : toddaaro/rust/ws, r=brson

This pull request converts the scheduler from a naive shared queue scheduler to a naive workstealing scheduler. The deque is still a queue inside a lock, but there is still a substantial performance gain. Fiddling with the messaging benchmark I got a ~10x speedup and observed massively reduced memory usage.

There are still *many* locations for optimization, but based on my experience so far it is a clear performance win as it is now.

10 years agoMakefiles: make rustpkgtest depend on rustpkg executable
Tim Chevalier [Tue, 30 Jul 2013 21:24:27 +0000 (14:24 -0700)]
Makefiles: make rustpkgtest depend on rustpkg executable

10 years agorustpkg: Eliminate a copy
Tim Chevalier [Tue, 30 Jul 2013 21:58:30 +0000 (14:58 -0700)]
rustpkg: Eliminate a copy

10 years agoauto merge of #8385 : cmr/rust/big-rollup, r=alexcrichton
bors [Thu, 8 Aug 2013 21:32:02 +0000 (14:32 -0700)]
auto merge of #8385 : cmr/rust/big-rollup, r=alexcrichton

This is a fairly large rollup, but I've tested everything locally, and none of
it should be platform-specific.

r=alexcrichton (bdfdbdd)
r=brson (d803c18)
r=alexcrichton (a5041d0)
r=bstrie (317412a)
r=alexcrichton (135c85e)
r=thestinger (8805baa)
r=pcwalton (0661178)
r=cmr (9397fe0)
r=cmr (caa4135)
r=cmr (6a21d93)
r=cmr (4dc3379)
r=cmr (0aa5154)
r=cmr (18be261)
r=thestinger (f10be03)

10 years agoEnabled workstealing in the scheduler. Previously we had one global work queue shared...
toddaaro [Mon, 5 Aug 2013 20:06:24 +0000 (13:06 -0700)]
Enabled workstealing in the scheduler. Previously we had one global work queue shared by each scheduler. Now there is a separate work queue for each scheduler, and work is "stolen" from other queues when it is exhausted locally.

10 years agoFix more priv fallout
Corey Richardson [Thu, 8 Aug 2013 21:02:03 +0000 (17:02 -0400)]
Fix more priv fallout

10 years agoxfail-fast an aux test
Corey Richardson [Thu, 8 Aug 2013 19:34:59 +0000 (15:34 -0400)]
xfail-fast an aux test

10 years agoenv! syntax extension changes
Steven Fackler [Wed, 7 Aug 2013 04:50:23 +0000 (00:50 -0400)]
env! syntax extension changes

env! aborts compilation of the specified environment variable is not
defined and takes an optional second argument containing a custom
error message. option_env! creates an Option<&'static str> containing
the value of the environment variable.

There are no run-pass tests that check the behavior when the environment
variable is defined since the test framework doesn't support setting
environment variables at compile time as opposed to runtime. However,
both env! and option_env! are used inside of rustc itself, which should
act as a sufficient test.

Close #2248

10 years agostd: more fixes for os.rs for windows
Erick Tryzelaar [Thu, 8 Aug 2013 13:37:55 +0000 (06:37 -0700)]
std: more fixes for os.rs for windows

10 years agoauto merge of #8245 : alexcrichton/rust/fmt2, r=graydon
bors [Thu, 8 Aug 2013 07:22:52 +0000 (00:22 -0700)]
auto merge of #8245 : alexcrichton/rust/fmt2, r=graydon

This is a reopening of #8182, although this removes any abuse of the compiler internals. Now it's just a pure syntax extension (hard coded what the attribute names are).

10 years agostd: import HANDLE for os::list_dir for windows
Erick Tryzelaar [Thu, 8 Aug 2013 04:07:06 +0000 (21:07 -0700)]
std: import HANDLE for os::list_dir for windows

10 years agoFix a stack to use the new .to_c_str() api
Erick Tryzelaar [Thu, 8 Aug 2013 03:25:38 +0000 (20:25 -0700)]
Fix a stack to use the new .to_c_str() api

10 years agoFix fallout
Corey Richardson [Thu, 8 Aug 2013 03:20:06 +0000 (23:20 -0400)]
Fix fallout

10 years ago(cleanup) Improve rtabort message for atomic-sleep.
Ben Blum [Tue, 6 Aug 2013 00:14:20 +0000 (20:14 -0400)]
(cleanup) Improve rtabort message for atomic-sleep.

10 years agofix recv_ready for Port to take &self and not need to return a tuple. Close #8192.
Ben Blum [Mon, 5 Aug 2013 23:58:10 +0000 (19:58 -0400)]
fix recv_ready for Port to take &self and not need to return a tuple. Close #8192.

10 years agoextra: Remove all each_* methods in treemap
blake2-ppc [Tue, 6 Aug 2013 20:53:51 +0000 (22:53 +0200)]
extra: Remove all each_* methods in treemap

.each_key(), .each_value() and the other methods are replaced by .iter()
and .rev_iter(), and restrictions of those iterators.

10 years agoextra: Implement .rev_iter() in treemap
blake2-ppc [Tue, 6 Aug 2013 19:57:46 +0000 (21:57 +0200)]
extra: Implement .rev_iter() in treemap

Implement reverse iterators for TreeMap and TreeSet, that produce the
keys in backward order.

10 years agoextra: External iterators for TreeSet set operations
blake2-ppc [Tue, 6 Aug 2013 18:17:06 +0000 (20:17 +0200)]
extra: External iterators for TreeSet set operations

Write external iterators for Difference, Sym. Difference, Intersection
and Union set operations.

These iterators are generic insofar that they could work on any ordered
sequence iterators, even though they are type specialized to the
TreeSetIterator in this case.

Looking at the `check` function in the treeset tests, rustc seems
unwilling to compile a function resembling::

    fn check<'a, T: Iterator<&'a int>>(... )

so the tests for these iterators are still running the legacy loop
protocol.

10 years agoextra: Simplify Eq/Ord in treemap
blake2-ppc [Tue, 6 Aug 2013 15:27:39 +0000 (17:27 +0200)]
extra: Simplify Eq/Ord in treemap

Write the Eq and Ord impls for TreeMap in a more straightforward way
using iterator::Zip

10 years agoGedit/gtksourceview language spec: add 'in' keyword
Simon Sapin [Tue, 6 Aug 2013 19:31:35 +0000 (20:31 +0100)]
Gedit/gtksourceview language spec: add 'in' keyword

10 years agostd: add missing #[inline] annotation to the f64 arithmetic trait impls.
Huon Wilson [Tue, 6 Aug 2013 12:19:33 +0000 (22:19 +1000)]
std: add missing #[inline] annotation to the f64 arithmetic trait impls.

10 years agomisc help message fix
Do Nhat Minh [Tue, 6 Aug 2013 03:04:58 +0000 (11:04 +0800)]
misc help message fix

10 years agoAdd some documentation about globals in ffi docs
Alex Crichton [Tue, 6 Aug 2013 02:16:29 +0000 (19:16 -0700)]
Add some documentation about globals in ffi docs

10 years agoAdd weak_rng to get a random algo that puts more emphasis on speed than security
Jordi Boggiano [Tue, 6 Aug 2013 20:14:32 +0000 (22:14 +0200)]
Add weak_rng to get a random algo that puts more emphasis on speed than security

10 years agoDocument rand module with more emphasis on cryptographic security
Jordi Boggiano [Tue, 6 Aug 2013 20:13:26 +0000 (22:13 +0200)]
Document rand module with more emphasis on cryptographic security

10 years agoChange const to static
Sangeun Kim [Wed, 7 Aug 2013 07:47:21 +0000 (16:47 +0900)]
Change const to static

10 years agoChange Freeze to Static
Sangeun Kim [Wed, 7 Aug 2013 07:44:42 +0000 (16:44 +0900)]
Change Freeze to Static

10 years agoFix unit structs in cross-crate situtations
Alex Crichton [Wed, 7 Aug 2013 18:52:33 +0000 (11:52 -0700)]
Fix unit structs in cross-crate situtations

10 years agoextra: add `internal` to {de,in}flate_bytes_ naming to address nit
darkf [Mon, 5 Aug 2013 13:06:43 +0000 (06:06 -0700)]
extra: add `internal` to {de,in}flate_bytes_ naming to address nit

10 years agoadd extra::flate::deflate_bytes_zlib and a test
darkf [Mon, 5 Aug 2013 05:37:09 +0000 (22:37 -0700)]
add extra::flate::deflate_bytes_zlib and a test

10 years agoadd inflate_bytes_zlib to exra::flate
darkf [Mon, 5 Aug 2013 05:28:53 +0000 (22:28 -0700)]
add inflate_bytes_zlib to exra::flate

10 years agoTurn OptGroups into a main opt and a main and an aliased opts
Jordi Boggiano [Mon, 5 Aug 2013 12:37:54 +0000 (14:37 +0200)]
Turn OptGroups into a main opt and a main and an aliased opts

This way opt_present("apple") will match no matter if the user passed -a or --apple

10 years agoAdd missing getopts::groups::optflagmulti function
Jordi Boggiano [Mon, 5 Aug 2013 12:34:58 +0000 (14:34 +0200)]
Add missing getopts::groups::optflagmulti function

10 years agoForbid `priv` where it has no effect
Alex Crichton [Wed, 7 Aug 2013 06:03:31 +0000 (23:03 -0700)]
Forbid `priv` where it has no effect

This is everywhere except struct fields and enum variants.

10 years agoImplement DoubleEndedIterator on Range
Kevin Ballard [Wed, 7 Aug 2013 05:34:22 +0000 (22:34 -0700)]
Implement DoubleEndedIterator on Range

Range is now invertable as long as its element type conforms to Integer.

Remove int::range_rev() et al in favor of range().invert().

10 years agorustc: Fix for-range loops that can use iterators
blake2-ppc [Wed, 7 Aug 2013 18:19:15 +0000 (20:19 +0200)]
rustc: Fix for-range loops that can use iterators

Transform range loops that can be regular iterator loops.

10 years agoBugfix .each_edge in middle/graph.rs
blake2-ppc [Wed, 7 Aug 2013 17:29:19 +0000 (19:29 +0200)]
Bugfix .each_edge in middle/graph.rs

Edge iterator used the length of the nodes vector, must be a mistake.

10 years agostd: Fix for-range loops that can use iterators
blake2-ppc [Wed, 7 Aug 2013 14:58:56 +0000 (16:58 +0200)]
std: Fix for-range loops that can use iterators

Fix inappropriate for-range loops to use for-iterator constructs (or
other appropriate solution) instead.

10 years agoextra: Remove all .each methods in smallintmap
blake2-ppc [Wed, 7 Aug 2013 14:59:17 +0000 (16:59 +0200)]
extra: Remove all .each methods in smallintmap

10 years agoAdd initial support for a new formatting syntax
Alex Crichton [Mon, 29 Jul 2013 08:12:41 +0000 (01:12 -0700)]
Add initial support for a new formatting syntax

The new macro is available under the name ifmt! (only an intermediate name)

10 years agoauto merge of #8358 : brson/rust/newrt, r=brson
bors [Wed, 7 Aug 2013 23:47:15 +0000 (16:47 -0700)]
auto merge of #8358 : brson/rust/newrt, r=brson

10 years agoTurn on the new runtime
Brian Anderson [Mon, 5 Aug 2013 07:47:04 +0000 (00:47 -0700)]
Turn on the new runtime

10 years agorusti: Disable tests
Brian Anderson [Wed, 7 Aug 2013 04:20:03 +0000 (21:20 -0700)]
rusti: Disable tests

Segfaulted on one of the bots. Maybe out of stack?

10 years agoDisable linked failure tests
Brian Anderson [Tue, 6 Aug 2013 21:32:30 +0000 (14:32 -0700)]
Disable linked failure tests

The implementation currently contains a race that leads to segfaults.

10 years agodoc: Fix deadlocks in tutorial due to yield bustage
Brian Anderson [Tue, 6 Aug 2013 20:25:09 +0000 (13:25 -0700)]
doc: Fix deadlocks in tutorial due to yield bustage

10 years agoxfail debug-info/option-like-enum
Brian Anderson [Tue, 6 Aug 2013 05:39:48 +0000 (22:39 -0700)]
xfail debug-info/option-like-enum

Don't understand why this broke.

10 years agotest: Fix deadlock in task-perf-linked-failure
Brian Anderson [Tue, 6 Aug 2013 04:15:02 +0000 (21:15 -0700)]
test: Fix deadlock in task-perf-linked-failure

10 years agotest: xfail a bunch of tests that are incorrectly reading os::args()[1]
Brian Anderson [Tue, 6 Aug 2013 04:11:25 +0000 (21:11 -0700)]
test: xfail a bunch of tests that are incorrectly reading os::args()[1]

10 years agorustpkg: Disable test_uninstall
Brian Anderson [Tue, 6 Aug 2013 01:15:07 +0000 (18:15 -0700)]
rustpkg: Disable test_uninstall

Seems to not work

10 years agorustc: Use 4MB stacks. Needed for unoptimized builds apparently.
Brian Anderson [Mon, 5 Aug 2013 20:10:34 +0000 (13:10 -0700)]
rustc: Use 4MB stacks. Needed for unoptimized builds apparently.

10 years agostd: Allow spawners to specify stack size
Brian Anderson [Mon, 5 Aug 2013 20:10:08 +0000 (13:10 -0700)]
std: Allow spawners to specify stack size

10 years agostd::rt: Pull RUST_MIN_STACK from the environment
Brian Anderson [Mon, 5 Aug 2013 19:43:33 +0000 (12:43 -0700)]
std::rt: Pull RUST_MIN_STACK from the environment

10 years agostd::rt: 2MB stacks again
Brian Anderson [Mon, 5 Aug 2013 19:14:03 +0000 (12:14 -0700)]
std::rt: 2MB stacks again

10 years agoauto merge of #8320 : mihneadb/rust/freq_count, r=cmr
bors [Wed, 7 Aug 2013 22:02:19 +0000 (15:02 -0700)]
auto merge of #8320 : mihneadb/rust/freq_count, r=cmr

10 years agoMerge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls
Erick Tryzelaar [Wed, 7 Aug 2013 21:10:39 +0000 (14:10 -0700)]
Merge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls

10 years agostd: fix a bad type cast for in str.to_c_str()
Erick Tryzelaar [Wed, 7 Aug 2013 04:19:38 +0000 (21:19 -0700)]
std: fix a bad type cast for in str.to_c_str()

10 years agostd: Make CString::new unsafe b/c it can mutate a *T ptr
Erick Tryzelaar [Wed, 7 Aug 2013 04:11:10 +0000 (21:11 -0700)]
std: Make CString::new unsafe b/c it can mutate a *T ptr

10 years agostd: remove unnecessary test from c_str.drop and use safer transmute
Erick Tryzelaar [Wed, 7 Aug 2013 04:08:39 +0000 (21:08 -0700)]
std: remove unnecessary test from c_str.drop and use safer transmute

10 years agostd: Fix c_str.iter() and add test
Erick Tryzelaar [Wed, 7 Aug 2013 04:06:12 +0000 (21:06 -0700)]
std: Fix c_str.iter() and add test

10 years agoauto merge of #8294 : erickt/rust/map-move, r=bblum
bors [Wed, 7 Aug 2013 20:23:07 +0000 (13:23 -0700)]
auto merge of #8294 : erickt/rust/map-move, r=bblum

According to #7887, we've decided to use the syntax of `fn map<U>(f: &fn(&T) -> U) -> U`, which passes a reference to the closure, and to `fn map_move<U>(f: &fn(T) -> U) -> U` which moves the value into the closure. This PR adds these `.map_move()` functions to `Option` and `Result`.

In addition, it has these other minor features:

* Replaces a couple uses of `option.get()`, `result.get()`, and `result.get_err()` with `option.unwrap()`, `result.unwrap()`, and `result.unwrap_err()`. (See #8268 and #8288 for a more thorough adaptation of this functionality.
* Removes `option.take_map()` and `option.take_map_default()`. These two functions can be easily written as `.take().map_move(...)`.
* Adds a better error message to `result.unwrap()` and `result.unwrap_err()`.

10 years agoauto merge of #8326 : thestinger/rust/iterator, r=alexcrichton
bors [Wed, 7 Aug 2013 17:32:20 +0000 (10:32 -0700)]
auto merge of #8326 : thestinger/rust/iterator, r=alexcrichton

The `extra::iter` module wasn't actually included in `extra.rs` when it was moved from `std`... I assume no one is going to miss it.

10 years agoAdd frequency count to extra::stat. #8281
Mihnea Dobrescu-Balaur [Wed, 7 Aug 2013 16:46:09 +0000 (09:46 -0700)]
Add frequency count to extra::stat. #8281

10 years agoauto merge of #8373 : alexcrichton/rust/disable-rusti, r=cmr
bors [Wed, 7 Aug 2013 15:53:20 +0000 (08:53 -0700)]
auto merge of #8373 : alexcrichton/rust/disable-rusti, r=cmr

These are causing problems on the linux bots, I'll investigate soon.

10 years agostd: removed option.take_map{,_default}
Erick Tryzelaar [Sun, 4 Aug 2013 23:30:51 +0000 (16:30 -0700)]
std: removed option.take_map{,_default}

10 years agocore: option.map_consume -> option.map_move
Erick Tryzelaar [Sun, 4 Aug 2013 21:59:36 +0000 (14:59 -0700)]
core: option.map_consume -> option.map_move

10 years agoRevert "Re-enable rusti tests"
Alex Crichton [Wed, 7 Aug 2013 15:29:49 +0000 (08:29 -0700)]
Revert "Re-enable rusti tests"

This reverts commit d5de801cc1b4a3147dfd5a29a3d0e129ee0fe783.

10 years agostd: add result.map_move, result.map_err_move
Erick Tryzelaar [Sun, 4 Aug 2013 23:05:25 +0000 (16:05 -0700)]
std: add result.map_move, result.map_err_move

10 years agooption.get -> option.unwrap
Erick Tryzelaar [Sun, 28 Jul 2013 16:31:37 +0000 (09:31 -0700)]
option.get -> option.unwrap

10 years agoauto merge of #8305 : huonw/rust/triage-fixes, r=cmr
bors [Wed, 7 Aug 2013 13:56:19 +0000 (06:56 -0700)]
auto merge of #8305 : huonw/rust/triage-fixes, r=cmr

The two deletions are because the test cases are very old (still using `class` and modes!), and, as far as I can tell (since they are so old), the areas they test are well tested by other rpass tests.

10 years agotestsuite: add explanation to a Note, and remove duplicated code.
Huon Wilson [Mon, 5 Aug 2013 09:56:59 +0000 (19:56 +1000)]
testsuite: add explanation to a Note, and remove duplicated code.

Fixes #7302.

10 years agotestsuite: remove incorrect section of 2 test cases. (Also, &const is disappearing.)
Huon Wilson [Mon, 5 Aug 2013 09:53:42 +0000 (19:53 +1000)]
testsuite: remove incorrect section of 2 test cases. (Also, &const is disappearing.)

Fixes #7304.

10 years agotestsuite: remove 2 very outdated testcases; functionality is tested by other class...
Huon Wilson [Mon, 5 Aug 2013 09:50:23 +0000 (19:50 +1000)]
testsuite: remove 2 very outdated testcases; functionality is tested by other class-*.rs tests.

Fixes #7305, #7307.