]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agodoc: updates rust manual (loop to continue)
Piotr Jawniak [Mon, 12 May 2014 16:17:13 +0000 (18:17 +0200)]
doc: updates rust manual (loop to continue)

Keyword for continue expressions was changed from loop to continue, but the
manual was not updated.

10 years agoMake ProcessOutput Eq, TotalEq, Clone
Yehuda Katz [Mon, 12 May 2014 17:59:49 +0000 (10:59 -0700)]
Make ProcessOutput Eq, TotalEq, Clone

10 years agolibcore: remove fails from slice.rs and remove duplicated length checking
Kevin Butler [Mon, 12 May 2014 18:44:19 +0000 (19:44 +0100)]
libcore: remove fails from slice.rs and remove duplicated length checking

core::slice::raw::{shift_ptr,pop_ptr} now returns Option<*T> rather than
*T. They no longer fail on empty slices.

[breaking-change]

10 years agoadd shebang to scripts that have execute bit set
David Creswick [Mon, 12 May 2014 18:35:08 +0000 (13:35 -0500)]
add shebang to scripts that have execute bit set

10 years agorustdoc: Fix hiding implementations of traits
Alex Crichton [Mon, 12 May 2014 20:40:11 +0000 (13:40 -0700)]
rustdoc: Fix hiding implementations of traits

This bug was introduced when rustdoc gained the ability to hyperlink across
crates in pub use statements.

Closes #14125

10 years agoAdd the patch number to version strings. Closes #13289
Brian Anderson [Mon, 12 May 2014 22:30:24 +0000 (15:30 -0700)]
Add the patch number to version strings. Closes #13289

10 years agoFix typos in rustc manpage
Alexandre Gagnon [Mon, 12 May 2014 22:49:39 +0000 (18:49 -0400)]
Fix typos in rustc manpage

10 years agoauto merge of #14157 : pcwalton/rust/detildestr-rustdoc, r=pcwalton
bors [Tue, 13 May 2014 01:37:13 +0000 (18:37 -0700)]
auto merge of #14157 : pcwalton/rust/detildestr-rustdoc, r=pcwalton

r? @brson

10 years agolibrustdoc: Remove all `~str` usage from librustdoc.
Patrick Walton [Mon, 12 May 2014 20:44:59 +0000 (13:44 -0700)]
librustdoc: Remove all `~str` usage from librustdoc.

10 years agolibrustc: Remove all uses of `~str` from librustc.
Patrick Walton [Sat, 10 May 2014 01:45:36 +0000 (18:45 -0700)]
librustc: Remove all uses of `~str` from librustc.

10 years agoauto merge of #13932 : MrAlert/rust/win-compat, r=brson
bors [Mon, 12 May 2014 16:12:04 +0000 (09:12 -0700)]
auto merge of #13932 : MrAlert/rust/win-compat, r=brson

This addresses #12842 by offering fallback implementations for functions that aren't available.

In this case, as Windows XP simply doesn't support symbolic links at all, the fallbacks simply return an error code indicating that the function hasn't been implemented. This should allow programs written in Rust to run under XP while still offering full support for symbolic links under newer versions of Windows with the same binary, but due to LLVM using stderror_s(), which isn't available in msvcrt.dll in XP, rustc itself will not.

The fallback implementation is as follows:

Calling the function instead calls to a mutable function pointer. This in and of itself would not constitute a performance hit because DLL calls are implemented in a similar manner (see Import Address Table). The function pointer initially points to a thunk which tries to get the address of the associated function and write it back to the function pointer. If it fails to find the function, it instead writes the address to a fallback. As this operation is idempotent, reading and writing the pointer simply needs to be atomic. Subsequent calls to the function should be as fast as any other DLL call, as the pointer will then point directly to either the correct function or a fallback.

10 years agoauto merge of #13922 : Rufflewind/rust/patch-1, r=pnkfelix
bors [Mon, 12 May 2014 10:36:53 +0000 (03:36 -0700)]
auto merge of #13922 : Rufflewind/rust/patch-1, r=pnkfelix

Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).

10 years agoauto merge of #14127 : thestinger/rust/snapshot, r=huonw
bors [Mon, 12 May 2014 07:31:52 +0000 (00:31 -0700)]
auto merge of #14127 : thestinger/rust/snapshot, r=huonw

10 years agoregister snapshots
Daniel Micay [Mon, 12 May 2014 06:51:00 +0000 (02:51 -0400)]
register snapshots

10 years agoauto merge of #14096 : nick29581/rust/driver, r=brson
bors [Mon, 12 May 2014 04:31:48 +0000 (21:31 -0700)]
auto merge of #14096 : nick29581/rust/driver, r=brson

The goal of this refactoring is to make the rustc driver code easier to understand and use. Since this is as close to an API as we have, I think it is important that it is nice. On getting stuck in, I found that there wasn't as much to change as I'd hoped to make the stage... functions easier to use by tools (which is a good thing :-) ).

This patch only moves code around - mostly just moving code to different files, but a few extracted method refactorings too. To summarise the changes: I added driver::config which handles everything about configuring the compiler. driver::session now just defines and builds session objects. I moved driver code from librustc/lib.rs to librustc/driver/mod.rs so all the code is one place. I extracted methods to make emulating the compiler without being the compiler a little easier. Within the driver directory, I moved code around to more logically fit in the modules.

10 years agoauto merge of #14119 : thestinger/rust/heap, r=cmr
bors [Mon, 12 May 2014 00:51:41 +0000 (17:51 -0700)]
auto merge of #14119 : thestinger/rust/heap, r=cmr

10 years agomake sure jemalloc valgrind support is enabled
Daniel Micay [Sun, 11 May 2014 23:31:23 +0000 (19:31 -0400)]
make sure jemalloc valgrind support is enabled

This requires pointing it at the valgrind headers we carry in-tree.

10 years agoauto merge of #14110 : SSheldon/rust/strbuf_mutable, r=alexcrichton
bors [Sun, 11 May 2014 23:21:44 +0000 (16:21 -0700)]
auto merge of #14110 : SSheldon/rust/strbuf_mutable, r=alexcrichton

Despite implementing the Container trait, StrBuf did not implement the Mutable trait and had no clear method; this request implements the clear method of the Mutable trait for StrBuf.

Testing done: added a test and ran `make check` without any failures.

10 years agoheap: replace `exchange_free` with `deallocate`
Daniel Micay [Sun, 11 May 2014 22:41:01 +0000 (18:41 -0400)]
heap: replace `exchange_free` with `deallocate`

The `std::rt::heap` API is Rust's global allocator, so there's no need
to have this as a separate API.

10 years agoauto merge of #14102 : moonglum/rust/slice-clarification-in-readme, r=kballard
bors [Sun, 11 May 2014 21:51:46 +0000 (14:51 -0700)]
auto merge of #14102 : moonglum/rust/slice-clarification-in-readme, r=kballard

There are no arrays in Rust, they are slices. Especially in the tutorial beginners should not be confused with wrong terminology. It helps to know the right names for things when you want to find something in the documentation.

@erickt explained that today to me and it helped me a lot when getting started :wink: Maybe we should also explain what a slice and what a vector is in the tutorial. If you like that, I will try to do that and attach that to the pull request :wink:

10 years agoheap: add a way to print allocator statistics
Daniel Micay [Sun, 11 May 2014 21:41:15 +0000 (17:41 -0400)]
heap: add a way to print allocator statistics

10 years agomark rust_malloc/rust_free as unsafe
Daniel Micay [Sun, 11 May 2014 21:17:53 +0000 (17:17 -0400)]
mark rust_malloc/rust_free as unsafe

Support for this was added by 08237cad8d2ce9287aedf99e57384407cc9dc42d.

10 years agomk: Bundle jemalloc with make dist
Alex Crichton [Sun, 11 May 2014 18:55:39 +0000 (11:55 -0700)]
mk: Bundle jemalloc with make dist

The dist tarball doesn't depend on git, so all git submodules must be included
inside of it.

10 years agoauto merge of #14108 : thestinger/rust/jemalloc, r=huonw
bors [Sun, 11 May 2014 18:21:44 +0000 (11:21 -0700)]
auto merge of #14108 : thestinger/rust/jemalloc, r=huonw

10 years agosync::deque: port to the new allocator API
Daniel Micay [Sun, 11 May 2014 09:34:06 +0000 (05:34 -0400)]
sync::deque: port to the new allocator API

10 years agohashmap: port to the new allocator API
Daniel Micay [Sun, 11 May 2014 08:19:05 +0000 (04:19 -0400)]
hashmap: port to the new allocator API

10 years agoauto merge of #14101 : alexcrichton/rust/issue-14095, r=kballard
bors [Sun, 11 May 2014 16:51:43 +0000 (09:51 -0700)]
auto merge of #14101 : alexcrichton/rust/issue-14095, r=kballard

When the values in html::item_type were updated, the JS definitions were
accidentally not updated as well.

Closes #14095

10 years agoauto merge of #14103 : alan-andrade/rust/manual-smallfix, r=alexcrichton
bors [Sun, 11 May 2014 15:01:43 +0000 (08:01 -0700)]
auto merge of #14103 : alan-andrade/rust/manual-smallfix, r=alexcrichton

Hi,

I believe the word "managed" doesn't make sense here anymore. It's just a box.

10 years agoauto merge of #14090 : TeXitoi/rust/shootout-nbody-improvement, r=alexcrichton
bors [Sun, 11 May 2014 11:41:43 +0000 (04:41 -0700)]
auto merge of #14090 : TeXitoi/rust/shootout-nbody-improvement, r=alexcrichton

- minimize bound check
- factorise operations
- use x, y, z instead of [f64, ..3]
- ~1.15 faster

10 years agoImplement Mutable trait for StrBuf.
Steven Sheldon [Sun, 11 May 2014 10:49:09 +0000 (03:49 -0700)]
Implement Mutable trait for StrBuf.

10 years agoauto merge of #14069 : alexcrichton/rust/cast-module, r=brson
bors [Sun, 11 May 2014 09:26:43 +0000 (02:26 -0700)]
auto merge of #14069 : alexcrichton/rust/cast-module, r=brson

This commit revisits the `cast` module in libcore and libstd, and scrutinizes
all functions inside of it. The result was to remove the `cast` module entirely,
folding all functionality into the `mem` module. Specifically, this is the fate
of each function in the `cast` module.

* transmute - This function was moved to `mem`, but it is now marked as
              #[unstable]. This is due to planned changes to the `transmute`
              function and how it can be invoked (see the #[unstable] comment).
              For more information, see RFC 5 and #12898

* transmute_copy - This function was moved to `mem`, with clarification that is
                   is not an error to invoke it with T/U that are different
                   sizes, but rather that it is strongly discouraged. This
                   function is now #[stable]

* forget - This function was moved to `mem` and marked #[stable]

* bump_box_refcount - This function was removed due to the deprecation of
                      managed boxes as well as its questionable utility.

* transmute_mut - This function was previously deprecated, and removed as part
                  of this commit.

* transmute_mut_unsafe - This function doesn't serve much of a purpose when it
                         can be achieved with an `as` in safe code, so it was
                         removed.

* transmute_lifetime - This function was removed because it is likely a strong
                       indication that code is incorrect in the first place.

* transmute_mut_lifetime - This function was removed for the same reasons as
                           `transmute_lifetime`

* copy_lifetime - This function was moved to `mem`, but it is marked
                  `#[unstable]` now due to the likelihood of being removed in
                  the future if it is found to not be very useful.

* copy_mut_lifetime - This function was also moved to `mem`, but had the same
                      treatment as `copy_lifetime`.

* copy_lifetime_vec - This function was removed because it is not used today,
                      and its existence is not necessary with DST
                      (copy_lifetime will suffice).

In summary, the cast module was stripped down to these functions, and then the
functions were moved to the `mem` module.

    transmute - #[unstable]
    transmute_copy - #[stable]
    forget - #[stable]
    copy_lifetime - #[unstable]
    copy_mut_lifetime - #[unstable]

10 years agocore: Remove the cast module
Alex Crichton [Fri, 9 May 2014 17:34:51 +0000 (10:34 -0700)]
core: Remove the cast module

This commit revisits the `cast` module in libcore and libstd, and scrutinizes
all functions inside of it. The result was to remove the `cast` module entirely,
folding all functionality into the `mem` module. Specifically, this is the fate
of each function in the `cast` module.

* transmute - This function was moved to `mem`, but it is now marked as
              #[unstable]. This is due to planned changes to the `transmute`
              function and how it can be invoked (see the #[unstable] comment).
              For more information, see RFC 5 and #12898

* transmute_copy - This function was moved to `mem`, with clarification that is
                   is not an error to invoke it with T/U that are different
                   sizes, but rather that it is strongly discouraged. This
                   function is now #[stable]

* forget - This function was moved to `mem` and marked #[stable]

* bump_box_refcount - This function was removed due to the deprecation of
                      managed boxes as well as its questionable utility.

* transmute_mut - This function was previously deprecated, and removed as part
                  of this commit.

* transmute_mut_unsafe - This function doesn't serve much of a purpose when it
                         can be achieved with an `as` in safe code, so it was
                         removed.

* transmute_lifetime - This function was removed because it is likely a strong
                       indication that code is incorrect in the first place.

* transmute_mut_lifetime - This function was removed for the same reasons as
                           `transmute_lifetime`

* copy_lifetime - This function was moved to `mem`, but it is marked
                  `#[unstable]` now due to the likelihood of being removed in
                  the future if it is found to not be very useful.

* copy_mut_lifetime - This function was also moved to `mem`, but had the same
                      treatment as `copy_lifetime`.

* copy_lifetime_vec - This function was removed because it is not used today,
                      and its existence is not necessary with DST
                      (copy_lifetime will suffice).

In summary, the cast module was stripped down to these functions, and then the
functions were moved to the `mem` module.

    transmute - #[unstable]
    transmute_copy - #[stable]
    forget - #[stable]
    copy_lifetime - #[unstable]
    copy_mut_lifetime - #[unstable]

[breaking-change]

10 years agoauto merge of #14006 : thestinger/rust/jemalloc, r=alexcrichton
bors [Sun, 11 May 2014 06:21:44 +0000 (23:21 -0700)]
auto merge of #14006 : thestinger/rust/jemalloc, r=alexcrichton

Closes #11807

10 years agoandroid workaround
Daniel Micay [Sun, 11 May 2014 04:54:41 +0000 (00:54 -0400)]
android workaround

10 years agopass correct CFLAGS for jemalloc
Daniel Micay [Sun, 11 May 2014 01:22:12 +0000 (21:22 -0400)]
pass correct CFLAGS for jemalloc

10 years agoClarification of Slice, Vector and Array
moonglum [Sun, 11 May 2014 00:16:47 +0000 (17:16 -0700)]
Clarification of Slice, Vector and Array

Especially in the tutorial beginners should not be confused with
wrong terminology. It helps to know the right names for things
when you want to find something in the documentation.

10 years agoremove the word managed from the trait explanation
Alan Andrade [Sun, 11 May 2014 00:30:59 +0000 (17:30 -0700)]
remove the word managed from the trait explanation

10 years agorustdoc: Fix search links to enums/typedefs
Alex Crichton [Sun, 11 May 2014 00:00:39 +0000 (17:00 -0700)]
rustdoc: Fix search links to enums/typedefs

When the values in html::item_type were updated, the JS definitions were
accidentally not updated as well.

Closes #14095

10 years agorename `global_heap` -> `libc_heap`
Daniel Micay [Sat, 10 May 2014 02:59:46 +0000 (22:59 -0400)]
rename `global_heap` -> `libc_heap`

This module only contains wrappers for malloc and realloc with
out-of-memory checks.

10 years agogitattributes: rm obsolete jemalloc entry
Daniel Micay [Wed, 7 May 2014 22:27:09 +0000 (18:27 -0400)]
gitattributes: rm obsolete jemalloc entry

10 years agovec: factor out some deallocation code
Daniel Micay [Sat, 10 May 2014 04:35:56 +0000 (00:35 -0400)]
vec: factor out some deallocation code

10 years agovec: move some code inside alloc_or_realloc
Daniel Micay [Sat, 10 May 2014 03:56:28 +0000 (23:56 -0400)]
vec: move some code inside alloc_or_realloc

10 years agofix Vec<ZeroSizeType>
Daniel Micay [Sat, 10 May 2014 03:56:15 +0000 (23:56 -0400)]
fix Vec<ZeroSizeType>

10 years agoinitial port of the exchange allocator to jemalloc
Daniel Micay [Wed, 7 May 2014 02:03:14 +0000 (22:03 -0400)]
initial port of the exchange allocator to jemalloc

In stage0, all allocations are 8-byte aligned. Passing a size and
alignment to free is not yet implemented everywhere (0 size and 8 align
are used as placeholders). Fixing this is part of #13994.

Closes #13616

10 years agouse jemalloc to implement Vec<T>
Daniel Micay [Tue, 6 May 2014 21:01:16 +0000 (17:01 -0400)]
use jemalloc to implement Vec<T>

10 years agoadd an align parameter to exchange_malloc
Daniel Micay [Sat, 26 Apr 2014 01:24:51 +0000 (21:24 -0400)]
add an align parameter to exchange_malloc

Closes #13094

10 years agoadd back jemalloc to the tree
Daniel Micay [Fri, 25 Apr 2014 06:19:34 +0000 (02:19 -0400)]
add back jemalloc to the tree

This adds a `std::rt::heap` module with a nice allocator API. It's a
step towards fixing #13094 and is a starting point for working on a
generic allocator trait.

The revision used for the jemalloc submodule is the stable 3.6.0 release.

Closes #11807

10 years agoReorganise driver code.
Nick Cameron [Tue, 6 May 2014 11:38:01 +0000 (23:38 +1200)]
Reorganise driver code.

The goal of this refactoring is to make the rustc driver code easier to understand and use. Since this is as close to an API as we have, I think it is important that it is nice. On getting stuck in, I found that there wasn't as much to change as I'd hoped to make the stage... fns easier to use by tools.

This patch only moves code around - mostly just moving code to different files, but a few extracted method refactorings too. To summarise the changes: I added driver::config which handles everything about configuring the compiler. driver::session now just defines and builds session objects. I moved driver code from librustc/lib.rs to librustc/driver/mod.rs so all the code is one place. I extracted methods to make emulating the compiler without being the compiler a little easier. Within the driver directory, I moved code around to more logically fit in the modules.

10 years agoauto merge of #14081 : Manishearth/rust/c-schar-reexport, r=huonw
bors [Sat, 10 May 2014 19:31:35 +0000 (12:31 -0700)]
auto merge of #14081 : Manishearth/rust/c-schar-reexport, r=huonw

Don't merge this until #14076 merges, since it is based on top of that branch to avoid merge conflicts.

10 years agoshootout-nbody improvements
Guillaume Pinot [Fri, 9 May 2014 23:34:06 +0000 (01:34 +0200)]
shootout-nbody improvements

- minimize bound check
- factorise operations
- use x, y, z instead of [f64, ..3]
- ~1.15 faster

10 years agoauto merge of #14073 : alexcrichton/rust/snapshots, r=huonw
bors [Sat, 10 May 2014 16:56:34 +0000 (09:56 -0700)]
auto merge of #14073 : alexcrichton/rust/snapshots, r=huonw

10 years agoReexport wchar_t, c_schar
Manish Goregaokar [Sat, 10 May 2014 03:41:38 +0000 (09:11 +0530)]
Reexport wchar_t, c_schar

10 years agoauto merge of #14068 : alexcrichton/rust/rustdoc-xcrate-links, r=brson
bors [Sat, 10 May 2014 10:36:30 +0000 (03:36 -0700)]
auto merge of #14068 : alexcrichton/rust/rustdoc-xcrate-links, r=brson

This should improve the libcore experience quite a bit when looking at the
libstd documentation.

10 years agoauto merge of #14066 : edwardw/rust/pod-to-copy, r=alexcrichton
bors [Sat, 10 May 2014 09:11:32 +0000 (02:11 -0700)]
auto merge of #14066 : edwardw/rust/pod-to-copy, r=alexcrichton

Some error messages still use the word `Pod` instead of `Copy`. Renames
them.

10 years agoauto merge of #14056 : kballard/rust/vim_indent_fix, r=huonw
bors [Sat, 10 May 2014 06:51:30 +0000 (23:51 -0700)]
auto merge of #14056 : kballard/rust/vim_indent_fix, r=huonw

cindent handles the following case incorrectly:

    impl X {
        b: int,
        //
        c: int,
    }

if you try and insert a new line after the `c` declaration.

To fix this, fix the get_line_trimmed() function to work properly, and
then extend GetRustIndent to keep searching backwards until it finds a
non-blank line after trimming. This lets it handle the trailing comma
case properly, as if the comment were never there.

Fixes #14041.

10 years agoRegister new snapshots
Alex Crichton [Fri, 9 May 2014 23:30:57 +0000 (16:30 -0700)]
Register new snapshots

10 years agoauto merge of #14065 : alexcrichton/rust/ignore-flaky-windows-test, r=brson
bors [Sat, 10 May 2014 03:31:31 +0000 (20:31 -0700)]
auto merge of #14065 : alexcrichton/rust/ignore-flaky-windows-test, r=brson

See #14064 for some rationale, but the basic idea is that I suspect that there
is an LLVM codegen bug somewhere, and I'm not entirely sure why it's happening
intermittently rather than deterministically...

cc #14064

10 years agoauto merge of #14063 : TeXitoi/rust/shootout-meteor-improvement, r=pcwalton
bors [Sat, 10 May 2014 01:36:29 +0000 (18:36 -0700)]
auto merge of #14063 : TeXitoi/rust/shootout-meteor-improvement, r=pcwalton

- 5-10% of raw speedup
- parallelization of the search

10 years agoauto merge of #14057 : kballard/rust/remove_no-bounds, r=sfackler
bors [Fri, 9 May 2014 23:41:47 +0000 (16:41 -0700)]
auto merge of #14057 : kballard/rust/remove_no-bounds, r=sfackler

Printing <no-bounds> on trait objects comes from a time when trait
objects had a non-empty default bounds set. As they no longer have any
default bounds, printing <no-bounds> is just noise.

10 years agoauto merge of #14055 : nikomatsakis/rust/issue-5527-use-substs-in-trans, r=pcwalton
bors [Fri, 9 May 2014 21:51:38 +0000 (14:51 -0700)]
auto merge of #14055 : nikomatsakis/rust/issue-5527-use-substs-in-trans, r=pcwalton

Code to use `ty::substs` in trans. As part of this, uncovered (and fixed) issue #14050.

r? @pcwalton

10 years agodoc: Fix some broken links
Alex Crichton [Fri, 9 May 2014 20:57:37 +0000 (13:57 -0700)]
doc: Fix some broken links

10 years agorustdoc: Hyperlink cross-crate reexports
Alex Crichton [Fri, 9 May 2014 20:52:17 +0000 (13:52 -0700)]
rustdoc: Hyperlink cross-crate reexports

This should improve the libcore experience quite a bit when looking at the
libstd documentation.

10 years agoauto merge of #14054 : luqmana/rust/at, r=alexcrichton
bors [Fri, 9 May 2014 19:56:35 +0000 (12:56 -0700)]
auto merge of #14054 : luqmana/rust/at, r=alexcrichton

`/data/local/tmp` seems to be more common.

10 years agoauto merge of #14046 : alexcrichton/rust/ignore-a-test-on-freebsd, r=kballard
bors [Fri, 9 May 2014 18:01:42 +0000 (11:01 -0700)]
auto merge of #14046 : alexcrichton/rust/ignore-a-test-on-freebsd, r=kballard

This test runs successfully manually, but the bots are having trouble getting
this test to pass. Ignore it on freebsd for now.

10 years agoRename Pod to Copy
Edward Wang [Fri, 9 May 2014 17:35:22 +0000 (01:35 +0800)]
Rename Pod to Copy

Some error messages still use the word `Pod` instead of `Copy`. Renames
them.

10 years agoserialize: Ignore two flaky json tests on windows
Alex Crichton [Fri, 9 May 2014 16:49:30 +0000 (09:49 -0700)]
serialize: Ignore two flaky json tests on windows

See #14064 for some rationale, but the basic idea is that I suspect that there
is an LLVM codegen bug somewhere, and I'm not entirely sure why it's happening
intermittently rather than deterministically...

cc #14064

10 years agoauto merge of #14053 : FlaPer87/rust/master, r=huonw
bors [Fri, 9 May 2014 16:11:35 +0000 (09:11 -0700)]
auto merge of #14053 : FlaPer87/rust/master, r=huonw

This patch allows for using derivings for `kinds` in libcore

r? @alexcrichton

10 years agoshootout-meteor improvement
Guillaume Pinot [Fri, 9 May 2014 15:32:06 +0000 (17:32 +0200)]
shootout-meteor improvement

- 5-10% of raw speedup
- parallelization of the search

10 years agoauto merge of #14044 : hirschenberger/rust/lint_mut_match, r=alexcrichton
bors [Fri, 9 May 2014 13:26:33 +0000 (06:26 -0700)]
auto merge of #14044 : hirschenberger/rust/lint_mut_match, r=alexcrichton

fixing #13866

10 years agoauto merge of #14043 : sanxiyn/rust/attr-reference, r=alexcrichton
bors [Fri, 9 May 2014 11:36:33 +0000 (04:36 -0700)]
auto merge of #14043 : sanxiyn/rust/attr-reference, r=alexcrichton

Attribute grammar in reference manual allowed `#[foo, bar]`, which does not match parser behavior.

Also rename nonterminals to match parser code.

Fix #13825.

10 years agoCurrently trans uses Vec<ty::t> to represent substitutions instead of a proper
Niko Matsakis [Wed, 7 May 2014 11:20:15 +0000 (07:20 -0400)]
Currently trans uses Vec<ty::t> to represent substitutions instead of a proper
ty::substs struct. This is a holdover from the olden days of yore. This patch
removes the last vestiges of that practice. This is part of the work
I was doing on #5527.

10 years agoCheck lifetime parameters when we do check for supertrait impls. Fixes #14050.
Niko Matsakis [Thu, 8 May 2014 21:05:21 +0000 (17:05 -0400)]
Check lifetime parameters when we do check for supertrait impls. Fixes #14050.

10 years agoRename resolve_regions to resolve_regions_and_report_errors
Niko Matsakis [Thu, 8 May 2014 20:26:38 +0000 (16:26 -0400)]
Rename resolve_regions to resolve_regions_and_report_errors

10 years agoauto merge of #14035 : alexcrichton/rust/experimental, r=huonw
bors [Fri, 9 May 2014 09:41:36 +0000 (02:41 -0700)]
auto merge of #14035 : alexcrichton/rust/experimental, r=huonw

This was intended as part of the I/O timeouts commit, but it was mistakenly
forgotten. The type of the timeout argument is not guaranteed to remain constant
into the future.

10 years agoauto merge of #14025 : tbrooks8/rust/big_uint_doc, r=alexcrichton
bors [Fri, 9 May 2014 07:51:35 +0000 (00:51 -0700)]
auto merge of #14025 : tbrooks8/rust/big_uint_doc, r=alexcrichton

I changed the documentation for the BigUint to reflection the deprecation of ~[T] in favor of Vec<T>.

10 years agoauto merge of #14019 : brson/rust/docs, r=alexcrichton
bors [Fri, 9 May 2014 06:01:40 +0000 (23:01 -0700)]
auto merge of #14019 : brson/rust/docs, r=alexcrichton

Just small bits of polish.

10 years agoRemove <no-bounds> on trait objects
Kevin Ballard [Fri, 9 May 2014 04:32:06 +0000 (21:32 -0700)]
Remove <no-bounds> on trait objects

Printing <no-bounds> on trait objects comes from a time when trait
objects had a non-empty default bounds set. As they no longer have any
default bounds, printing <no-bounds> is just noise.

10 years agoauto merge of #13963 : kballard/rust/remove_owned_vec_from_iterator, r=pcwalton
bors [Fri, 9 May 2014 04:01:42 +0000 (21:01 -0700)]
auto merge of #13963 : kballard/rust/remove_owned_vec_from_iterator, r=pcwalton

With `~[T]` no longer growable, the `FromIterator` impl for `~[T]` doesn't make
much sense. Not only that, but nearly everywhere it is used is to convert from
a `Vec<T>` into a `~[T]`, for the sake of maintaining existing APIs. This turns
out to be a performance loss, as it means every API that returns `~[T]`, even a
supposedly non-copying one, is in fact doing extra allocations and memcpy's.
Even `&[T].to_owned()` is going through `Vec<T>` first.

Remove the `FromIterator` impl for `~[T]`, and adjust all the APIs that relied
on it to start using `Vec<T>` instead. This includes rewriting
`&[T].to_owned()` to be more efficient, among other performance wins.

Also add a new mechanism to go from `Vec<T>` -> `~[T]`, just in case anyone
truly needs that, using the new trait `FromVec`.

[breaking-change]

10 years agoauto merge of #14001 : alexcrichton/rust/issue-11680, r=pcwalton
bors [Fri, 9 May 2014 02:12:05 +0000 (19:12 -0700)]
auto merge of #14001 : alexcrichton/rust/issue-11680, r=pcwalton

The code in resolve erroneously assumed that private enums weren't visited, so
the logic was adjusted to check to see if the enum definition itself was public.

Closes #11680

10 years agovim: Fix an indentation issue with cindent
Kevin Ballard [Fri, 9 May 2014 02:04:23 +0000 (19:04 -0700)]
vim: Fix an indentation issue with cindent

cindent handles the following case incorrectly:

impl X {
    b: int,
    //
    c: int,
}

if you try and insert a new line after the `c` declaration.

To fix this, fix the get_line_trimmed() function to work properly, and
then extend GetRustIndent to keep searching backwards until it finds a
non-blank line after trimming. This lets it handle the trailing comma
case properly, as if the comment were never there.

Fixes #14041.

10 years agoauto merge of #14010 : richo/rust/tests/11493, r=alexcrichton
bors [Fri, 9 May 2014 00:16:43 +0000 (17:16 -0700)]
auto merge of #14010 : richo/rust/tests/11493, r=alexcrichton

Is this what you had in mind?

Closes #11493

10 years agolibstd: Check TMPDIR for android as well and if not set use '/data/local/tmp' instead...
Luqman Aden [Thu, 8 May 2014 23:53:04 +0000 (19:53 -0400)]
libstd: Check TMPDIR for android as well and if not set use '/data/local/tmp' instead of '/data/tmp'.

10 years agocore: Allow kinds derivings
Flavio Percoco [Thu, 8 May 2014 22:08:26 +0000 (00:08 +0200)]
core: Allow kinds derivings

10 years agoauto merge of #13990 : nikomatsakis/rust/issue-5527-cleanup-writeback, r=pcwalton
bors [Thu, 8 May 2014 21:16:41 +0000 (14:16 -0700)]
auto merge of #13990 : nikomatsakis/rust/issue-5527-cleanup-writeback, r=pcwalton

As part of #5527 I had to make some changes here and I just couldn't take it anymore. Refactor the writeback code. Should be functionally equivalent to the old stuff.

r? @pcwalton

10 years agoFix false lint warnings in match arms with multiple patterns
Falco Hirschenberger [Thu, 8 May 2014 19:48:45 +0000 (21:48 +0200)]
Fix false lint warnings in match arms with multiple patterns

fixing #13866

10 years agoauto merge of #13985 : alexcrichton/rust/libfmt, r=brson
bors [Thu, 8 May 2014 19:26:39 +0000 (12:26 -0700)]
auto merge of #13985 : alexcrichton/rust/libfmt, r=brson

This code does not belong in libstd, and rather belongs in a dedicated crate. In
the future, the syntax::ext::format module should move to the fmt_macros crate
(hence the name of the crate), but for now the fmt_macros crate will only
contain the format string parser.

The entire fmt_macros crate is marked #[experimental] because it is not meant
for general consumption, only the format!() interface is officially supported,
not the internals.

This is a breaking change for anyone using the internals of std::fmt::parse.
Some of the flags have moved to std::fmt::rt, while the actual parsing support
has all moved to the fmt_macros library.

[breaking-change]

10 years agoMove partition/partitioned/concat/connect tests back into slice
Kevin Ballard [Thu, 8 May 2014 19:03:33 +0000 (12:03 -0700)]
Move partition/partitioned/concat/connect tests back into slice

There was no reason to remove them from slice. They're testing methods
defined in slice, so that's where they belong.

Leave vec with copies of the partition/partitioned tests because it has
its own implementation of those methods.

10 years agoRestore Decodable impl for ~[T]
Kevin Ballard [Thu, 8 May 2014 18:50:35 +0000 (11:50 -0700)]
Restore Decodable impl for ~[T]

Bring back the Decodable impl for ~[T], this time using FromVec. It's
still not recommended that anyone use this, but at least it's available
if necessary.

10 years agoHandle breakage after libcore split
Kevin Ballard [Thu, 8 May 2014 04:53:11 +0000 (21:53 -0700)]
Handle breakage after libcore split

API Changes:

- &[T] and ~[T] no longer support the addition operator (+)

10 years agoAdd a mechanism to convert from Vec<T> to ~[T]
Kevin Ballard [Wed, 7 May 2014 03:14:54 +0000 (20:14 -0700)]
Add a mechanism to convert from Vec<T> to ~[T]

Add a new trait FromVec with one self-less method from_vec(). This is
kind of like FromIterator, but it consumes a Vec<T>. It's only
implemented for ~[T], but the idea is post-DST it can be implemented for
any Boxed<[T]>.

10 years agoHandle fallout in bench tests
Kevin Ballard [Mon, 5 May 2014 07:29:59 +0000 (00:29 -0700)]
Handle fallout in bench tests

10 years agoHandle fallout in documentation
Kevin Ballard [Mon, 5 May 2014 03:54:02 +0000 (20:54 -0700)]
Handle fallout in documentation

Tweak the tutorial's section on vectors and strings, to slightly clarify
the difference between fixed-size vectors, vectors, and slices.

10 years agoHandle more fallout
Kevin Ballard [Sun, 4 May 2014 20:20:47 +0000 (13:20 -0700)]
Handle more fallout

os::args() no longer auto-borrows to &[~str].

10 years agoHandle fallout in librustuv
Kevin Ballard [Sun, 4 May 2014 07:44:19 +0000 (00:44 -0700)]
Handle fallout in librustuv

API Changes:

- GetAddrInfoRequest::run() returns Result<Vec<..>, ..>
- Process::spawn() returns Result<(.., Vec<..>), ..>

10 years agoClean up unused imports
Kevin Ballard [Sun, 4 May 2014 07:25:44 +0000 (00:25 -0700)]
Clean up unused imports

10 years agoHandle fallout in libnative
Kevin Ballard [Sun, 4 May 2014 07:21:44 +0000 (00:21 -0700)]
Handle fallout in libnative

API Changes:

- GetAddrInfoRequest::run() returns Result<Vec<..>, ..>
- Process::spawn() returns Result(.., Vec<..>), ..>

10 years agoHandle fallout in librustc
Kevin Ballard [Sun, 4 May 2014 06:43:38 +0000 (23:43 -0700)]
Handle fallout in librustc

10 years agoHandle fallout in libserialize
Kevin Ballard [Sun, 4 May 2014 06:34:26 +0000 (23:34 -0700)]
Handle fallout in libserialize

API Changes:

- from_base64() returns Result<Vec<u8>, FromBase64Error>
- from_hex() returns Result<Vec<u8>, FromHexError>
- json::List is a Vec<Json>
- Decodable is no longer implemented on ~[T] (but Encodable still is)
- DecoderHelpers::read_to_vec() returns a Result<Vec<T>, E>

10 years agoHandle fallout for vector addition
Kevin Ballard [Sun, 4 May 2014 06:09:45 +0000 (23:09 -0700)]
Handle fallout for vector addition

Adding two vectors now results in a Vec<T> instead of a ~[T].

Implement Add on Vec<T>.

10 years agoHandle fallout in io::net::addrinfo, io::process, and rt::rtio
Kevin Ballard [Sun, 4 May 2014 05:55:35 +0000 (22:55 -0700)]
Handle fallout in io::net::addrinfo, io::process, and rt::rtio

API Changes:

- get_host_addresses() returns IoResult<Vec<IpAddr>>
- Process.extra_io is Vec<Option<io::PipeStream>>