]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agolibsyntax: Remove obsolete fixme.
Luqman Aden [Mon, 2 Sep 2013 04:00:23 +0000 (00:00 -0400)]
libsyntax: Remove obsolete fixme.

10 years agoauto merge of #8927 : thestinger/rust/repr, r=huonw
bors [Mon, 2 Sep 2013 09:05:45 +0000 (02:05 -0700)]
auto merge of #8927 : thestinger/rust/repr, r=huonw

10 years agoswitch __field__ hack to <unnamed_field>
Daniel Micay [Mon, 2 Sep 2013 08:59:51 +0000 (04:59 -0400)]
switch __field__ hack to <unnamed_field>

avoids conflict with fields actually named `__field__`

10 years agorepr: handle tuple structs sanely
Daniel Micay [Mon, 2 Sep 2013 06:56:08 +0000 (02:56 -0400)]
repr: handle tuple structs sanely

Closes #8919

10 years agoauto merge of #8931 : ILyoan/rust/turnoff_android_ndk_asm, r=thestinger
bors [Mon, 2 Sep 2013 07:20:44 +0000 (00:20 -0700)]
auto merge of #8931 : ILyoan/rust/turnoff_android_ndk_asm, r=thestinger

Now we don't need android ndk to generate unwind info for arm target thanks to LLVM upgrade.
This fix removes the ndk asm pass.

10 years agorepr: add support for trait objects
Daniel Micay [Mon, 2 Sep 2013 05:15:03 +0000 (01:15 -0400)]
repr: add support for trait objects

Closes #8916

10 years agoauto merge of #8928 : novalis/rust/fix-8898, r=thestinger
bors [Mon, 2 Sep 2013 05:35:45 +0000 (22:35 -0700)]
auto merge of #8928 : novalis/rust/fix-8898, r=thestinger

I think this fixes 8898.  I'm a bit unsure about how slices and owned pointers to vectors-of-unit already worked, but since they were already working, I didn't mess with them.

10 years agorepr: print functions as `fn()`
Daniel Micay [Mon, 2 Sep 2013 03:36:25 +0000 (23:36 -0400)]
repr: print functions as `fn()`

10 years agoturn off android ndk asm pass
Ilyong Cho [Fri, 30 Aug 2013 05:05:57 +0000 (14:05 +0900)]
turn off android ndk asm pass

10 years agoFix #8898
novalis [Mon, 2 Sep 2013 01:32:03 +0000 (21:32 -0400)]
Fix #8898

10 years agoauto merge of #8920 : Kimundi/rust/master, r=thestinger
bors [Sun, 1 Sep 2013 23:15:41 +0000 (16:15 -0700)]
auto merge of #8920 : Kimundi/rust/master, r=thestinger

10 years agoRenamed syntax::ast::ident -> Ident
Marvin Löbel [Mon, 2 Sep 2013 00:50:59 +0000 (02:50 +0200)]
Renamed syntax::ast::ident -> Ident

10 years agotouch llvm clean trigger
Daniel Micay [Sun, 1 Sep 2013 19:03:28 +0000 (15:03 -0400)]
touch llvm clean trigger

10 years agoauto merge of #8913 : poiru/rust/issue-8702, r=cmr
bors [Sun, 1 Sep 2013 15:50:44 +0000 (08:50 -0700)]
auto merge of #8913 : poiru/rust/issue-8702, r=cmr

Closes #8702.

10 years agoauto merge of #8276 : kballard/rust/iterator-protocol, r=cmr
bors [Sun, 1 Sep 2013 14:00:44 +0000 (07:00 -0700)]
auto merge of #8276 : kballard/rust/iterator-protocol, r=cmr

r? @thestinger

10 years agoauto merge of #8911 : Kimundi/rust/master, r=huonw
bors [Sun, 1 Sep 2013 12:30:47 +0000 (05:30 -0700)]
auto merge of #8911 : Kimundi/rust/master, r=huonw

Most notable: span -> Span

10 years agoModernized a few type names in rustc and syntax
Marvin Löbel [Sat, 31 Aug 2013 16:13:04 +0000 (18:13 +0200)]
Modernized a few type names in rustc and syntax

10 years agoFix incorrect strftime error handling in rust_localtime
Birunthan Mohanathas [Sun, 1 Sep 2013 11:57:29 +0000 (14:57 +0300)]
Fix incorrect strftime error handling in rust_localtime
Closes #8702.

10 years agoauto merge of #8907 : pnkfelix/rust/fsk-fix-makefile-8865, r=thestinger
bors [Sun, 1 Sep 2013 00:35:39 +0000 (17:35 -0700)]
auto merge of #8907 : pnkfelix/rust/fsk-fix-makefile-8865, r=thestinger

Fix #8865.

10 years agoauto merge of #8903 : luqmana/rust/en, r=thestinger
bors [Sat, 31 Aug 2013 23:25:40 +0000 (16:25 -0700)]
auto merge of #8903 : luqmana/rust/en, r=thestinger

Fixes #8735.

10 years agosmall cleanup of previous commit with mucho comments.
Felix S. Klock II [Sat, 31 Aug 2013 22:53:56 +0000 (00:53 +0200)]
small cleanup of previous commit with mucho comments.

10 years agoauto merge of #8899 : thestinger/rust/repr, r=huonw
bors [Sat, 31 Aug 2013 22:15:40 +0000 (15:15 -0700)]
auto merge of #8899 : thestinger/rust/repr, r=huonw

10 years agohypothetical fix for #8865.
Felix S. Klock II [Sat, 31 Aug 2013 19:44:50 +0000 (21:44 +0200)]
hypothetical fix for #8865.

10 years agodocument why some tests are xfail-fast
Daniel Micay [Sat, 31 Aug 2013 20:16:43 +0000 (16:16 -0400)]
document why some tests are xfail-fast

10 years agoauto merge of #8905 : sstewartgallus/rust/cleanup_tests, r=bblum
bors [Sat, 31 Aug 2013 19:40:40 +0000 (12:40 -0700)]
auto merge of #8905 : sstewartgallus/rust/cleanup_tests, r=bblum

In this commit I:
- removed unneeded heap allocations
- added extra whitespace to crowded expressions
- and removed unneeded syntax

Also, CC @bblum although this change is fairly unobjectionable.

10 years agoCleanup concurrency tests
Steven Stewart-Gallus [Sat, 31 Aug 2013 18:26:01 +0000 (11:26 -0700)]
Cleanup concurrency tests

In this commit I:
- removed unneeded heap allocations
- added extra whitespace to crowded expressions
- and removed unneeded syntax

10 years agolibrustc: Add export_name attribute to specify symbol name.
Luqman Aden [Sat, 31 Aug 2013 17:23:31 +0000 (13:23 -0400)]
librustc: Add export_name attribute to specify symbol name.

10 years agorepr: remove trailing {} from unit-like structs
Daniel Micay [Sat, 31 Aug 2013 05:28:59 +0000 (01:28 -0400)]
repr: remove trailing {} from unit-like structs

10 years agorepr: print the name of structs
Daniel Micay [Sat, 31 Aug 2013 04:15:55 +0000 (00:15 -0400)]
repr: print the name of structs

10 years agoauto merge of #8896 : lightcatcher/rust/default_eq_fix, r=thestinger
bors [Sat, 31 Aug 2013 04:40:32 +0000 (21:40 -0700)]
auto merge of #8896 : lightcatcher/rust/default_eq_fix, r=thestinger

Summary:
-removed "ne" methods in libstd and librustpkg
-made default "ne" be inlined
-made one of the "eq" methods in librustpkg follow more standard parameter naming convention

10 years agoauto merge of #8862 : dcrewi/rust/drop-redundant-ord-impls, r=thestinger
bors [Sat, 31 Aug 2013 03:30:35 +0000 (20:30 -0700)]
auto merge of #8862 : dcrewi/rust/drop-redundant-ord-impls, r=thestinger

If this were to break something, I would expect existing tests to catch it, and a `make check` run passes locally.

10 years agoauto merge of #8894 : alexcrichton/rust/faster, r=thestinger
bors [Sat, 31 Aug 2013 02:20:36 +0000 (19:20 -0700)]
auto merge of #8894 : alexcrichton/rust/faster, r=thestinger

The only changes to the default passes is that O1 now doesn't run the inline
pass, just always-inline with lifetime intrinsics. O2 also now has a threshold
of 225 instead of 275. Otherwise the default passes being run is the same.

I've also added a few more options for configuring the pass pipeline. Namely you
can now specify arguments to LLVM directly via the `--llvm-args` command line
option which operates similarly to `--passes`. I also added the ability to turn
off pre-population of the pass manager in case you want to run *only* your own
passes.

I would consider this as closing #8890. I don't think that we should change the default inlining threshold because LLVM/clang will probably have chosen those numbers more carefully than we would. Regardless, here's the performance numbers from this commit:

```
$ ./x86_64-apple-darwin/stage0/bin/rustc ./gistfile1.rs --test --opt-level=3 -o before
warning: no debug symbols in executable (-arch x86_64)
$ ./before --bench

running 1 test
test bench::aes_bench_x8 ... bench: 1602 ns/iter (+/- 66) = 7990 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured

$ ./x86_64-apple-darwin/stage1/bin/rustc ./gistfile1.rs --test --opt-level=3 -o after
warning: no debug symbols in executable (-arch x86_64)
$ ./after --bench

running 1 test
test bench::aes_bench_x8 ... bench: 2103 ns/iter (+/- 175) = 6086 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured

$ ./x86_64-apple-darwin/stage1/bin/rustc ./gistfile1.rs --test --opt-level=3 -o after --llvm-args '-inline-threshold=225'
warning: no debug symbols in executable (-arch x86_64)
$ ./after --bench

running 1 test
test bench::aes_bench_x8 ... bench: 1600 ns/iter (+/- 71) = 8000 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured

```

10 years agomade Eq for package_id use more standard parameter names
Eric Martin [Sat, 31 Aug 2013 02:10:36 +0000 (22:10 -0400)]
made Eq for package_id use more standard parameter names

10 years agoNow inline default 'ne' methods
Eric Martin [Sat, 31 Aug 2013 02:02:24 +0000 (22:02 -0400)]
Now inline default 'ne' methods

10 years agoremove several 'ne' methods
Eric Martin [Sat, 31 Aug 2013 01:53:25 +0000 (21:53 -0400)]
remove several 'ne' methods

10 years agoTweak pass management and add some more options
Alex Crichton [Sat, 31 Aug 2013 00:56:04 +0000 (17:56 -0700)]
Tweak pass management and add some more options

The only changes to the default passes is that O1 now doesn't run the inline
pass, just always-inline with lifetime intrinsics. O2 also now has a threshold
of 225 instead of 275. Otherwise the default passes being run is the same.

I've also added a few more options for configuring the pass pipeline. Namely you
can now specify arguments to LLVM directly via the `--llvm-args` command line
option which operates similarly to `--passes`. I also added the ability to turn
off pre-population of the pass manager in case you want to run *only* your own
passes.

10 years agoauto merge of #8889 : erickt/rust/cleanup, r=catamorphism
bors [Sat, 31 Aug 2013 00:20:36 +0000 (17:20 -0700)]
auto merge of #8889 : erickt/rust/cleanup, r=catamorphism

This fixes a couple minor things I've been sitting on. It cleans up some warnings, CapCases some types in librustc's rscope module, and adds a fixme.

10 years agoauto merge of #8831 : catamorphism/rust/extend_rust_path, r=catamorphism
bors [Fri, 30 Aug 2013 23:10:52 +0000 (16:10 -0700)]
auto merge of #8831 : catamorphism/rust/extend_rust_path, r=catamorphism

r? @brson

@metajack requested the ability to violate the "only workspaces can be in the RUST_PATH" rule for the purpose of bootstrapping Servo without having to restructure all the directories. This patch gives rustpkg the ability to find sources if a directory in the RUST_PATH directly contains one of rustpkg's "special" files (lib.rs, main.rs, bench.rs, or test.rs), even if it's not a workspace. In this case, it puts the build artifacts in the first workspace in the RUST_PATH.

I'm not sure whether or not it's a good idea to keep this feature in rustpkg permanently. Thus, I added a flag, ```--use-rust-path-hack```, and only enabled it when the flag is set.

10 years agorustpkg: Allow package directories to appear in the RUST_PATH
Tim Chevalier [Wed, 28 Aug 2013 21:52:37 +0000 (14:52 -0700)]
rustpkg: Allow package directories to appear in the RUST_PATH

This commit adds a rustpkg flag, --rust-path-hack, that allows
rustpkg to *search* inside package directories if they appear in
the RUST_PATH, while *building* libraries and executables into a
different target directory.

This behavior is hidden behind a flag because I believe we only
want to support it temporarily, to make it easier to port servo to
rustpkg.

This commit also includes a fix for how rustpkg fetches sources
from git repositories -- it uses a temporary directory as the target
when invoking `git clone`, then moves that directory into the workspace
if the clone was successful. (The old behavior was that when the
`git clone` failed, the empty target directory would be left lying
around anyway.)

10 years agorustpkg: Add a not_a_workspace condition
Tim Chevalier [Wed, 28 Aug 2013 18:35:11 +0000 (11:35 -0700)]
rustpkg: Add a not_a_workspace condition

10 years agostd: Add a file-renaming function to std::os
Tim Chevalier [Wed, 28 Aug 2013 19:27:10 +0000 (12:27 -0700)]
std: Add a file-renaming function to std::os

10 years agostd: Add a fixme for when we add Trait::<for T>::static_method()
Erick Tryzelaar [Fri, 30 Aug 2013 22:04:20 +0000 (15:04 -0700)]
std: Add a fixme for when we add Trait::<for T>::static_method()

10 years agorustc: capitalize types in rscope.rs
Erick Tryzelaar [Sat, 17 Aug 2013 18:09:52 +0000 (11:09 -0700)]
rustc: capitalize types in rscope.rs

10 years agofix various warnings
Erick Tryzelaar [Fri, 30 Aug 2013 22:06:11 +0000 (15:06 -0700)]
fix various warnings

10 years agorustc: Change a stray error! statement to debug!
Tim Chevalier [Wed, 28 Aug 2013 18:34:54 +0000 (11:34 -0700)]
rustc: Change a stray error! statement to debug!

10 years agoauto merge of #8886 : cmr/rust/test-restructure, r=cmr
bors [Fri, 30 Aug 2013 21:00:43 +0000 (14:00 -0700)]
auto merge of #8886 : cmr/rust/test-restructure, r=cmr

10 years agoRevert "src/test/bench: restructure"
Corey Richardson [Fri, 30 Aug 2013 20:17:53 +0000 (16:17 -0400)]
Revert "src/test/bench: restructure"

This reverts commit 14cdc26e8a7794e437946f46df5769362b42acdf.

10 years agoRevert "Teach compiletest to use multiple --src-base's"
Corey Richardson [Fri, 30 Aug 2013 20:17:32 +0000 (16:17 -0400)]
Revert "Teach compiletest to use multiple --src-base's"

This reverts commit 8a07f5708196dd72ec030018c2a215a4dd823b2e.

10 years agoRevert "Teach the makefile to use multiple src-base's"
Corey Richardson [Fri, 30 Aug 2013 20:17:29 +0000 (16:17 -0400)]
Revert "Teach the makefile to use multiple src-base's"

This reverts commit 43f851d2cb3976655078f032dc1a8cb88f1c8deb.

10 years agoauto merge of #8878 : toqueteos/rust/patch-1, r=sanxiyn
bors [Fri, 30 Aug 2013 19:55:39 +0000 (12:55 -0700)]
auto merge of #8878 : toqueteos/rust/patch-1, r=sanxiyn

As promised on #8876.

10 years agoauto merge of #8858 : blake2-ppc/rust/small-bugs, r=alexcrichton
bors [Fri, 30 Aug 2013 18:00:43 +0000 (11:00 -0700)]
auto merge of #8858 : blake2-ppc/rust/small-bugs, r=alexcrichton

Fix a bug in `s.slice_chars(a, b)` that did not accept `a == s.len()`.

Fix a bug in `!=` defined for DList.

Also simplify NormalizationIterator to use the CharIterator directly instead of mimicing the iteration itself.

10 years agoauto merge of #8877 : bouk/rust/master, r=sanxiyn
bors [Fri, 30 Aug 2013 16:45:39 +0000 (09:45 -0700)]
auto merge of #8877 : bouk/rust/master, r=sanxiyn

Ran into a missing space in the stdlib source

10 years agoauto merge of #8872 : MicahChalmer/rust/emacs-indent-fix, r=pnkfelix
bors [Fri, 30 Aug 2013 15:40:46 +0000 (08:40 -0700)]
auto merge of #8872 : MicahChalmer/rust/emacs-indent-fix, r=pnkfelix

This fixes some, but not all, of the issues mentioned in #8787

10 years agoauto merge of #8869 : alexcrichton/rust/issue-8847-fix-unused, r=huonw
bors [Fri, 30 Aug 2013 14:35:40 +0000 (07:35 -0700)]
auto merge of #8869 : alexcrichton/rust/issue-8847-fix-unused, r=huonw

Closes #8847

10 years agoauto merge of #8867 : thestinger/rust/smaller-arc, r=alexcrichton
bors [Fri, 30 Aug 2013 12:45:45 +0000 (05:45 -0700)]
auto merge of #8867 : thestinger/rust/smaller-arc, r=alexcrichton

10 years agoauto merge of #8857 : blake2-ppc/rust/std-str-remove, r=thestinger
bors [Fri, 30 Aug 2013 11:40:47 +0000 (04:40 -0700)]
auto merge of #8857 : blake2-ppc/rust/std-str-remove, r=thestinger

These are very easy to replace with methods on string slices, basically
`.char_len()` and `.len()`.

These are the replacement implementations I did to clean these
functions up, but seeing this I propose removal:

/// ...
pub fn count_chars(s: &str, begin: uint, end: uint) -> uint {
    // .slice() checks the char boundaries
    s.slice(begin, end).char_len()
}

/// Counts the number of bytes taken by the first `n` chars in `s`
/// starting from byte index `begin`.
///
/// Fails if there are less than `n` chars past `begin`
pub fn count_bytes<'b>(s: &'b str, begin: uint, n: uint) -> uint {
    s.slice_from(begin).slice_chars(0, n).len()
}

10 years agodoc/rust.md: Missing in keyword on keyword list.
Carlos [Fri, 30 Aug 2013 11:21:14 +0000 (13:21 +0200)]
doc/rust.md: Missing in keyword on keyword list.

10 years agoAdd missing space
Bouke van der Bijl [Fri, 30 Aug 2013 10:53:05 +0000 (12:53 +0200)]
Add missing space

10 years agoauto merge of #8854 : huonw/rust/rt-papercuts, r=brson
bors [Fri, 30 Aug 2013 10:30:43 +0000 (03:30 -0700)]
auto merge of #8854 : huonw/rust/rt-papercuts, r=brson

The only user-facing change is handling non-integer (and zero) `RUST_THREADS` more nicely:

```
$ RUST_THREADS=x rustc # old

You've met with a terrible fate, haven't you?

fatal runtime error: runtime tls key not initialized
Aborted
$ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new

You've met with a terrible fate, haven't you?

fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer
Aborted
```

The other changes are converting some `for .. in range(x,y)` to `vec::from_fn` or `for .. in x.iter()` as appropriate; and removing a chain of (seemingly) unnecessary pointer casts.

(Also, fixes a typo in `extra::test` from #8823.)

10 years agoauto merge of #8843 : alexcrichton/rust/fix-bug, r=huonw
bors [Fri, 30 Aug 2013 09:25:47 +0000 (02:25 -0700)]
auto merge of #8843 : alexcrichton/rust/fix-bug, r=huonw

Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134

10 years agoauto merge of #8820 : alexcrichton/rust/no-io-writer, r=brson
bors [Fri, 30 Aug 2013 08:20:44 +0000 (01:20 -0700)]
auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brson

At the same time, this updates the TyVisitor to use a mutable self because it's
probably going to be mutating state as it goes along anyway.

10 years agoauto merge of #8839 : sanxiyn/rust/env, r=thestinger
bors [Fri, 30 Aug 2013 07:15:47 +0000 (00:15 -0700)]
auto merge of #8839 : sanxiyn/rust/env, r=thestinger

10 years agoAlign field names in struct expressions with fields on same line as the opening curly...
Micah Chalmer [Fri, 30 Aug 2013 05:48:02 +0000 (01:48 -0400)]
Align field names in struct expressions with fields on same line as the opening curly brace

10 years agoMultiline comments with leading *s line up the *s
Micah Chalmer [Fri, 30 Aug 2013 05:15:32 +0000 (01:15 -0400)]
Multiline comments with leading *s line up the *s

10 years agoMake Zip iterator short-circuit
Kevin Ballard [Sat, 3 Aug 2013 22:41:29 +0000 (15:41 -0700)]
Make Zip iterator short-circuit

Python's zip() short-circuits by not even querying its right-hand
iterator if the left-hand one is done. Match that behavior here by not
calling .next() on the right iterator if the left one returns None.

10 years agoMake the iterator protocol more explicit
Kevin Ballard [Sat, 3 Aug 2013 20:51:49 +0000 (13:51 -0700)]
Make the iterator protocol more explicit

Document the fact that the iterator protocol only defines behavior up
until the first None is returned. After this point, iterators are free
to behave how they wish.

Add a new iterator adaptor Fuse<T> that modifies iterators to return
None forever if they returned None once.

10 years agoauto merge of #8819 : vadimcn/rust/unit-tests, r=brson
bors [Fri, 30 Aug 2013 03:40:47 +0000 (20:40 -0700)]
auto merge of #8819 : vadimcn/rust/unit-tests, r=brson

Some of the tests are failing.  I've only managed to fix 'memory_map_file', the rest are up for grabs...

Fixes #5261.

10 years agoOne indent after open paren with no argument
Micah Chalmer [Fri, 30 Aug 2013 03:28:36 +0000 (23:28 -0400)]
One indent after open paren with no argument

10 years agoCorrect indent with trailing spaces/comments on previous line
Micah Chalmer [Fri, 30 Aug 2013 02:59:38 +0000 (22:59 -0400)]
Correct indent with trailing spaces/comments on previous line

10 years agoCorrect the sources of glob imports
Alex Crichton [Fri, 30 Aug 2013 02:48:37 +0000 (19:48 -0700)]
Correct the sources of glob imports

Closes #8847

10 years agoFix a bug with statics inside blocks in generic fns
Alex Crichton [Thu, 29 Aug 2013 06:28:06 +0000 (23:28 -0700)]
Fix a bug with statics inside blocks in generic fns

Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134

10 years agoauto merge of #8458 : cmr/rust/test-restructure, r=brson
bors [Fri, 30 Aug 2013 01:45:47 +0000 (18:45 -0700)]
auto merge of #8458 : cmr/rust/test-restructure, r=brson

This should make benchmarks easier to understand. But, it doesn't work.
BENCH_RS in mk/tests.mk has everything, from what I can tell in remake, but
only those that are direct children of src/test/bench get build and run.
@graydon, can you lend your expertise? I can't make heads or tails of this
makefile.

10 years agoreduce the size of UnsafeArc from 2 words to 1
Daniel Micay [Fri, 30 Aug 2013 00:23:29 +0000 (20:23 -0400)]
reduce the size of UnsafeArc from 2 words to 1

10 years agoauto merge of #8866 : brson/rust/rvstdrun, r=alexcrichton
bors [Thu, 29 Aug 2013 23:45:49 +0000 (16:45 -0700)]
auto merge of #8866 : brson/rust/rvstdrun, r=alexcrichton

...ing, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
mk/rt.mk
src/libuv

This caused a big performance regression on the windows bots and possibly some unexpected segfaults in pretty-printing tests.

10 years agopartial revert of 31fa865
David Creswick [Thu, 29 Aug 2013 22:52:22 +0000 (17:52 -0500)]
partial revert of 31fa865

Ratio is generic and so might contain a non-total orderable type. It
should not use the default Ord implementation.

10 years agoRevert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
Brian Anderson [Thu, 29 Aug 2013 21:20:48 +0000 (14:20 -0700)]
Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
mk/rt.mk
src/libuv

10 years agoauto merge of #8848 : ILyoan/rust/mk_libuv, r=cmr
bors [Thu, 29 Aug 2013 20:05:47 +0000 (13:05 -0700)]
auto merge of #8848 : ILyoan/rust/mk_libuv, r=cmr

10 years agodrop some redundant Ord method implementations
David Creswick [Thu, 29 Aug 2013 18:22:04 +0000 (13:22 -0500)]
drop some redundant Ord method implementations

10 years agoauto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelix
bors [Thu, 29 Aug 2013 18:10:47 +0000 (11:10 -0700)]
auto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelix

Moves the Times trait to num while the question of whether it should
exist at all gets hashed out as a completely separate question.

10 years agoauto merge of #8840 : alexcrichton/rust/update-vendors, r=cmr
bors [Thu, 29 Aug 2013 16:50:48 +0000 (09:50 -0700)]
auto merge of #8840 : alexcrichton/rust/update-vendors, r=cmr

The LLVM update includes patches from #8488 by @klutzy to build llvm on mingw-64 and also to enable segmented stacks on that platform.

The libuv patch is a rebase on the now-current joyent/master in order to fix #8829

10 years agoextra::dlist: Fix bug in Eq::ne
blake2-ppc [Thu, 29 Aug 2013 15:11:11 +0000 (17:11 +0200)]
extra::dlist: Fix bug in Eq::ne

10 years agostd::str: Fix bug in .slice_chars()
blake2-ppc [Thu, 29 Aug 2013 15:11:11 +0000 (17:11 +0200)]
std::str: Fix bug in .slice_chars()

`s.slice_chars(a, b)` did not allow the case where `a == s.len()`, this
is a bug I introduced last time I touched the method; add a test for
this case.

10 years agostd::str: Use CharIterator in NormalizationIterator
blake2-ppc [Thu, 29 Aug 2013 15:11:11 +0000 (17:11 +0200)]
std::str: Use CharIterator in NormalizationIterator

Just to simplify and not have the iteration logic repeated in multiple places.

10 years agostd::str: Remove functions count_chars, count_bytes
blake2-ppc [Thu, 29 Aug 2013 13:21:05 +0000 (15:21 +0200)]
std::str: Remove functions count_chars, count_bytes

These are very easy to replace with methods on string slices, basically
`.char_len()` and `.len()`.

These are the replacement implementations I did to clean these
functions up, but seeing this I propose removal:

/// ...
pub fn count_chars(s: &str, begin: uint, end: uint) -> uint {
    // .slice() checks the char boundaries
    s.slice(begin, end).char_len()
}

/// Counts the number of bytes taken by the first `n` chars in `s`
/// starting from byte index `begin`.
///
/// Fails if there are less than `n` chars past `begin`
pub fn count_bytes<'b>(s: &'b str, begin: uint, n: uint) -> uint {
    s.slice_from(begin).slice_chars(0, n).len()
}

10 years agoauto merge of #8838 : brson/rust/rvfpelim, r=alexcrichton
bors [Thu, 29 Aug 2013 13:00:48 +0000 (06:00 -0700)]
auto merge of #8838 : brson/rust/rvfpelim, r=alexcrichton

This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing
changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de.

Conflicts:
src/rustllvm/RustWrapper.cpp

Fixes #8833

10 years agoextra: error message should reflact that RUST_TEST_TASKS should be strictly positive...
Huon Wilson [Thu, 29 Aug 2013 12:58:27 +0000 (22:58 +1000)]
extra: error message should reflact that RUST_TEST_TASKS should be strictly positive (zero is illegal).

10 years agort: remove a series of unfortunate casts.
Huon Wilson [Thu, 29 Aug 2013 12:28:49 +0000 (22:28 +1000)]
rt: remove a series of unfortunate casts.

10 years agort: use sugary functions rather than manual range loops.
Huon Wilson [Thu, 29 Aug 2013 11:49:55 +0000 (21:49 +1000)]
rt: use sugary functions rather than manual range loops.

10 years agort: Handle non-integer RUST_THREADS (slightly) more gracefully.
Huon Wilson [Thu, 29 Aug 2013 10:57:37 +0000 (20:57 +1000)]
rt: Handle non-integer RUST_THREADS (slightly) more gracefully.

Previously it would call Option.unwrap(), which calls `fail!` on None,
which doesn't work without the runtime (e.g. when initialising it).

10 years agoauto merge of #8823 : huonw/rust/6233, r=brson
bors [Thu, 29 Aug 2013 11:50:43 +0000 (04:50 -0700)]
auto merge of #8823 : huonw/rust/6233, r=brson

Fixes #7335.

10 years agoauto merge of #8830 : andersk/rust/indent-4, r=catamorphism
bors [Thu, 29 Aug 2013 10:10:42 +0000 (03:10 -0700)]
auto merge of #8830 : andersk/rust/indent-4, r=catamorphism

`default-tab-width` is standardly 8, but most programmers and style guides prefer an indentation width smaller than that.  Rust itself uses 4 space indents.  Most other Emacs modes define the indentation width as 4 or 2 spaces, independently of the width of a Tab character.  Depending on `default-tab-width` makes especially little sense for rust-mode because it sets `indent-tabs-mode` to `nil`.

10 years agomk: Fix libuv makefile generation on android
Ilyong Cho [Thu, 29 Aug 2013 08:44:23 +0000 (17:44 +0900)]
mk: Fix libuv makefile generation on android

10 years agoRemove @io::Writer from sys/repr/reflect
Alex Crichton [Thu, 8 Aug 2013 20:46:40 +0000 (13:46 -0700)]
Remove @io::Writer from sys/repr/reflect

At the same time, this updates the TyVisitor to use a mutable self because it's
probably going to be mutating state as it goes along anyway.

10 years agoRemove the iter module.
Jason Fager [Thu, 29 Aug 2013 05:27:24 +0000 (01:27 -0400)]
Remove the iter module.

Moves the Times trait to num while the question of whether it should
exist at all gets hashed out as a completely separate question.

10 years agoEnable segmented stacks for llvm on mingw-64
Alex Crichton [Thu, 29 Aug 2013 03:36:25 +0000 (20:36 -0700)]
Enable segmented stacks for llvm on mingw-64

cc #8488

10 years agoUpdate libuv to rebase on top of joyent/master
Alex Crichton [Thu, 29 Aug 2013 03:33:24 +0000 (20:33 -0700)]
Update libuv to rebase on top of joyent/master

Closes #8829

10 years agoauto merge of #8800 : fhahn/rust/ticket_5239, r=alexcrichton
bors [Thu, 29 Aug 2013 03:30:36 +0000 (20:30 -0700)]
auto merge of #8800 : fhahn/rust/ticket_5239, r=alexcrichton

I've added a test for the second example mentioned in #5239. The first example does not compile with a reasonable error message. Should I add a compile-fail test for that example as well?

    /rust/src/test/run-pass/issue-5239.rs:15:45: 15:51 error: binary operation + cannot be applied to type `&int`
    rust/src/test/run-pass/issue-5239.rs:15     let _f = |ref x: int| { x += 1};
                                                                                         ^~~~~~

    error: aborting due to previous error

10 years agoRevert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"
Brian Anderson [Thu, 29 Aug 2013 00:41:40 +0000 (17:41 -0700)]
Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"

This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing
changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de.

Conflicts:
src/rustllvm/RustWrapper.cpp

10 years agoMake the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.
Huon Wilson [Wed, 28 Aug 2013 12:58:41 +0000 (22:58 +1000)]
Make the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.

Fixes #7335.

10 years agoauto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton
bors [Thu, 29 Aug 2013 00:35:35 +0000 (17:35 -0700)]
auto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton

It turns out that gyp (libuv's new build system) wants x64 for a 64-bit x86
architecture and ia32 for a 32-bit architecture, so this performs the relevant
mapping and then invokes libuv's configure script with the appropriate target
architecture.

This can be verified by running make with VERBOSE=1 and seeing that beforehand
on a 64-bit build libuv was passed "-arch i386" and now it's passed
"-arch x86_64"

Closes #8826