]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoFix vector terminology in the manual.
Steve Klabnik [Wed, 10 Sep 2014 21:02:37 +0000 (17:02 -0400)]
Fix vector terminology in the manual.

fixes #17148

9 years agoauto merge of #17127 : alexcrichton/rust/rollup, r=alexcrichton
bors [Tue, 9 Sep 2014 20:16:19 +0000 (20:16 +0000)]
auto merge of #17127 : alexcrichton/rust/rollup, r=alexcrichton

9 years agoTest fixes from the rollup
Alex Crichton [Tue, 9 Sep 2014 15:08:30 +0000 (08:08 -0700)]
Test fixes from the rollup

9 years agorollup merge of #17114 : nick29581/dst-type
Alex Crichton [Tue, 9 Sep 2014 14:39:23 +0000 (07:39 -0700)]
rollup merge of #17114 : nick29581/dst-type

9 years agorollup merge of #17107 : steveklabnik/uninitialized_bindings
Alex Crichton [Tue, 9 Sep 2014 14:39:14 +0000 (07:39 -0700)]
rollup merge of #17107 : steveklabnik/uninitialized_bindings

9 years agorollup merge of #17106 : treeman/test-warnings
Alex Crichton [Tue, 9 Sep 2014 14:39:11 +0000 (07:39 -0700)]
rollup merge of #17106 : treeman/test-warnings

9 years agorollup merge of #17101 : pcwalton/for-loop-borrowck
Alex Crichton [Tue, 9 Sep 2014 14:39:09 +0000 (07:39 -0700)]
rollup merge of #17101 : pcwalton/for-loop-borrowck

9 years agorollup merge of #17096 : TeXitoi/relicense-shootout-chameneos-redux
Alex Crichton [Tue, 9 Sep 2014 14:39:05 +0000 (07:39 -0700)]
rollup merge of #17096 : TeXitoi/relicense-shootout-chameneos-redux

9 years agorollup merge of #17093 : nathantypanski/17021
Alex Crichton [Tue, 9 Sep 2014 14:39:02 +0000 (07:39 -0700)]
rollup merge of #17093 : nathantypanski/17021

9 years agorollup merge of #17090 : alexcrichton/rustdoc-no-strip
Alex Crichton [Tue, 9 Sep 2014 14:38:58 +0000 (07:38 -0700)]
rollup merge of #17090 : alexcrichton/rustdoc-no-strip

9 years agorollup merge of #17087 : DanAlbert/llvm-3.6
Alex Crichton [Tue, 9 Sep 2014 14:38:56 +0000 (07:38 -0700)]
rollup merge of #17087 : DanAlbert/llvm-3.6

9 years agorollup merge of #17085 : jakub-/issue-17074
Alex Crichton [Tue, 9 Sep 2014 14:38:54 +0000 (07:38 -0700)]
rollup merge of #17085 : jakub-/issue-17074

9 years agorollup merge of #17080 : treeman/issue-17066
Alex Crichton [Tue, 9 Sep 2014 14:38:51 +0000 (07:38 -0700)]
rollup merge of #17080 : treeman/issue-17066

9 years agorollup merge of #17077 : TeXitoi/relicense-shootout-nbody
Alex Crichton [Tue, 9 Sep 2014 14:38:47 +0000 (07:38 -0700)]
rollup merge of #17077 : TeXitoi/relicense-shootout-nbody

9 years agorollup merge of #17070 : TeXitoi/relicense-shootout-reverse-complement.rs
Alex Crichton [Tue, 9 Sep 2014 14:38:30 +0000 (07:38 -0700)]
rollup merge of #17070 : TeXitoi/relicense-shootout-reverse-complement.rs

9 years agorollup merge of #17062 : nathantypanski/generic-lifetime-trait-impl
Alex Crichton [Tue, 9 Sep 2014 14:38:27 +0000 (07:38 -0700)]
rollup merge of #17062 : nathantypanski/generic-lifetime-trait-impl

9 years agorollup merge of #17061 : nathantypanski/test-borrowck-trait
Alex Crichton [Tue, 9 Sep 2014 14:38:23 +0000 (07:38 -0700)]
rollup merge of #17061 : nathantypanski/test-borrowck-trait

9 years agorollup merge of #17054 : pcwalton/subslice-syntax
Alex Crichton [Tue, 9 Sep 2014 14:38:21 +0000 (07:38 -0700)]
rollup merge of #17054 : pcwalton/subslice-syntax

9 years agorollup merge of #17052 : pcwalton/feature-gate-subslices
Alex Crichton [Tue, 9 Sep 2014 14:38:17 +0000 (07:38 -0700)]
rollup merge of #17052 : pcwalton/feature-gate-subslices

9 years agorollup merge of #17040 : kmcallister/borrow-extctxt
Alex Crichton [Tue, 9 Sep 2014 14:38:11 +0000 (07:38 -0700)]
rollup merge of #17040 : kmcallister/borrow-extctxt

9 years agorollup merge of #17020 : nodakai/libnative-c_int
Alex Crichton [Tue, 9 Sep 2014 14:38:06 +0000 (07:38 -0700)]
rollup merge of #17020 : nodakai/libnative-c_int

9 years agorollup merge of #17013 : rgawdzik/literal_int
Alex Crichton [Tue, 9 Sep 2014 14:38:03 +0000 (07:38 -0700)]
rollup merge of #17013 : rgawdzik/literal_int

9 years agorollup merge of #17008 : nick29581/impl2
Alex Crichton [Tue, 9 Sep 2014 14:37:58 +0000 (07:37 -0700)]
rollup merge of #17008 : nick29581/impl2

9 years agorollup merge of #16971 : treeman/json-decode
Alex Crichton [Tue, 9 Sep 2014 14:37:43 +0000 (07:37 -0700)]
rollup merge of #16971 : treeman/json-decode

9 years agoauto merge of #16927 : dotdash/rust/llvmup, r=alexcrichton
bors [Tue, 9 Sep 2014 17:16:18 +0000 (17:16 +0000)]
auto merge of #16927 : dotdash/rust/llvmup, r=alexcrichton

9 years agoauto merge of #16827 : steveklabnik/rust/fix_doc_index, r=brson
bors [Tue, 9 Sep 2014 13:26:16 +0000 (13:26 +0000)]
auto merge of #16827 : steveklabnik/rust/fix_doc_index, r=brson

Fixes #14972

9 years agoauto merge of #16965 : huonw/rust/isaac-oob--, r=alexcrichton
bors [Tue, 9 Sep 2014 11:11:17 +0000 (11:11 +0000)]
auto merge of #16965 : huonw/rust/isaac-oob--, r=alexcrichton

rand: inform the optimiser that indexing is never out-of-bounds.

This uses a bitwise mask to ensure that there's no bounds checking for
the array accesses when generating the next random number. This isn't
costless, but the single instruction is nothing compared to the branch.

A `debug_assert` for "bounds check" is preserved to ensure that
refactoring doesn't accidentally break it (i.e. create values of `cnt`
that are out of bounds with the masking causing it to silently wrap-
around).

Before:

test test::rand_isaac   ... bench: 990 ns/iter (+/- 24) = 808 MB/s
test test::rand_isaac64 ... bench: 614 ns/iter (+/- 25) = 1302 MB/s

After:

test test::rand_isaac   ... bench: 877 ns/iter (+/- 134) = 912 MB/s
test test::rand_isaac64 ... bench: 470 ns/iter (+/- 30) = 1702 MB/s

(It also removes the unsafe code in Isaac64Rng.next_u64, with a *gain*
in performance; today is a good day.)

9 years agoRemove some test warnings.
Jonas Hietala [Tue, 9 Sep 2014 09:32:58 +0000 (11:32 +0200)]
Remove some test warnings.

9 years agoauto merge of #17083 : thestinger/rust/jemalloc, r=alexcrichton
bors [Tue, 9 Sep 2014 07:56:19 +0000 (07:56 +0000)]
auto merge of #17083 : thestinger/rust/jemalloc, r=alexcrichton

The performance hit from these checks is significant, but unoptimized
builds are already incredibly slow. Enabling these checks results in
better test coverage since there are bots doing unoptimized builds, and
the cost is relatively small in the context of an unoptimized build.
This also allows using `JEMALLOC_FLAGS` to override the default
configure flags.

9 years agoHandle `Sized?` in `type` items.
Nick Cameron [Tue, 9 Sep 2014 06:22:20 +0000 (18:22 +1200)]
Handle `Sized?` in `type` items.

Resolves bounds for `type` and adds the warning for 'unbounds' (? bounds) that we have for bounds.

Closes #16888

9 years agoDecoding json now defaults Option<_> to None.
Jonas Hietala [Tue, 9 Sep 2014 05:28:59 +0000 (07:28 +0200)]
Decoding json now defaults Option<_> to None.

Closes #12794

9 years agoauto merge of #16825 : steveklabnik/rust/fix_manual_array_terms, r=brson
bors [Tue, 9 Sep 2014 04:26:18 +0000 (04:26 +0000)]
auto merge of #16825 : steveklabnik/rust/fix_manual_array_terms, r=brson

fixes #16015

9 years agolibrustc: Change the syntax of subslice matching to use postfix `..`
Patrick Walton [Sat, 6 Sep 2014 22:23:55 +0000 (15:23 -0700)]
librustc: Change the syntax of subslice matching to use postfix `..`
instead of prefix `..`.

This breaks code that looked like:

    match foo {
        [ first, ..middle, last ] => { ... }
    }

Change this code to:

    match foo {
        [ first, middle.., last ] => { ... }
    }

RFC #55.

Closes #16967.

[breaking-change]

9 years agoguide: Remove reference to uninitialized bindings
Steve Klabnik [Mon, 8 Sep 2014 22:50:08 +0000 (18:50 -0400)]
guide: Remove reference to uninitialized bindings

There isn't a good way to fit this in, so let's just not
mention it.

Fixes #16792.

9 years agoCheck traits for built-in bounds in impls
Nick Cameron [Fri, 5 Sep 2014 05:10:32 +0000 (17:10 +1200)]
Check traits for built-in bounds in impls

9 years agoauto merge of #16952 : alexcrichton/rust/windows-large-console-write, r=brson
bors [Mon, 8 Sep 2014 20:51:14 +0000 (20:51 +0000)]
auto merge of #16952 : alexcrichton/rust/windows-large-console-write, r=brson

I've found that 64k is still too much and continue to see the errors as reported
in #14940. I've locally found that 32k fails, and 24k succeeds, so I've trimmed
the size down to 10000 which the included links in the added comment end up
recommending.

It sounds like the limit can still be hit with many threads in play, but I have
yet to reproduce this, so I figure we can wait until that's hit (if it's
possible) and then take action.

9 years agostd: Turn down the stdout chunk size
Alex Crichton [Wed, 3 Sep 2014 01:39:19 +0000 (18:39 -0700)]
std: Turn down the stdout chunk size

I've found that 64k is still too much and continue to see the errors as reported
in #14940. I've locally found that 32k fails, and 24k succeeds, so I've trimmed
the size down to 8192 which libuv happens to use as well.

It sounds like the limit can still be hit with many threads in play, but I have
yet to reproduce this, so I figure we can wait until that's hit (if it's
possible) and then take action.

9 years agoquote: Explicitly borrow the ExtCtxt
Keegan McAllister [Sat, 6 Sep 2014 02:50:05 +0000 (19:50 -0700)]
quote: Explicitly borrow the ExtCtxt

Fixes #16992.

9 years agolibrustc: Feature gate subslice matching in non-tail positions.
Patrick Walton [Sat, 6 Sep 2014 20:52:07 +0000 (13:52 -0700)]
librustc: Feature gate subslice matching in non-tail positions.

This breaks code that uses the `..xs` form anywhere but at the end of a
slice. For example:

    match foo {
        [ 1, ..xs, 2 ]
        [ ..xs, 1, 2 ]
    }

Add the `#![feature(advanced_slice_patterns)]` gate to reenable the
syntax.

RFC #54.

Closes #16951.

[breaking-change]

9 years agolibrustc: Make sure lifetimes in `for` loop heads outlive the `for` loop
Patrick Walton [Mon, 8 Sep 2014 16:50:18 +0000 (09:50 -0700)]
librustc: Make sure lifetimes in `for` loop heads outlive the `for` loop
itself.

This breaks code like:

    for &x in my_vector.iter() {
        my_vector[2] = "wibble";
        ...
    }

Change this code to not invalidate iterators. For example:

    for i in range(0, my_vector.len()) {
        my_vector[2] = "wibble";
        ...
    }

The `for-loop-does-not-borrow-iterators` test for #8372 was incorrect
and has been removed.

Closes #16820.

[breaking-change]

9 years agoauto merge of #12809 : eddyb/rust/ty-arena, r=cmr
bors [Mon, 8 Sep 2014 15:36:13 +0000 (15:36 +0000)]
auto merge of #12809 : eddyb/rust/ty-arena, r=cmr

This was inspired by seeing a LLVM flatline of **~600MB** when running rustc with jemalloc (each type's `t_box_` is allocated on the heap, creating a lot of fragmentation, which jemalloc can deal with, unlike glibc).

9 years agoUpdate LLVM to fix a crash in the MergeFunc pass
Björn Steinbrink [Mon, 8 Sep 2014 15:07:03 +0000 (17:07 +0200)]
Update LLVM to fix a crash in the MergeFunc pass

9 years agoauto merge of #16903 : mahkoh/rust/move_items_unwrap, r=aturon
bors [Mon, 8 Sep 2014 13:46:15 +0000 (13:46 +0000)]
auto merge of #16903 : mahkoh/rust/move_items_unwrap, r=aturon

Closes #16879

9 years agorustdoc: fix fallout from the addition of a 'tcx lifetime on tcx.
Eduard Burtescu [Sat, 6 Sep 2014 16:13:40 +0000 (19:13 +0300)]
rustdoc: fix fallout from the addition of a 'tcx lifetime on tcx.

9 years agorustc: fix fallout from the addition of a 'tcx lifetime on trans::Block.
Eduard Burtescu [Sat, 6 Sep 2014 16:13:04 +0000 (19:13 +0300)]
rustc: fix fallout from the addition of a 'tcx lifetime on trans::Block.

9 years agorustc: fix fallout from the addition of a 'tcx lifetime on tcx.
Eduard Burtescu [Tue, 22 Apr 2014 12:56:37 +0000 (15:56 +0300)]
rustc: fix fallout from the addition of a 'tcx lifetime on tcx.

9 years agorustc: use a TypedArena to allocate types in the type context.
Eduard Burtescu [Tue, 22 Apr 2014 11:33:15 +0000 (14:33 +0300)]
rustc: use a TypedArena to allocate types in the type context.

9 years agoauto merge of #17053 : thestinger/rust/large_address_aware, r=sfackler,cmr
bors [Mon, 8 Sep 2014 11:56:12 +0000 (11:56 +0000)]
auto merge of #17053 : thestinger/rust/large_address_aware, r=sfackler,cmr

By default, 32-bit Windows executables are restricted to 2GiB of address
space even when running on 64-bit Windows when 4GiB is available.

Closes #17043

9 years agoauto merge of #17063 : huonw/rust/snap, r=alexcrichton
bors [Mon, 8 Sep 2014 10:06:15 +0000 (10:06 +0000)]
auto merge of #17063 : huonw/rust/snap, r=alexcrichton

Closes #16880.

9 years agorand: inform the optimiser that indexing is never out-of-bounds.
Huon Wilson [Mon, 8 Sep 2014 09:33:37 +0000 (19:33 +1000)]
rand: inform the optimiser that indexing is never out-of-bounds.

This uses a bitwise mask to ensure that there's no bounds checking for
the array accesses when generating the next random number. This isn't
costless, but the single instruction is nothing compared to the branch.

A `debug_assert` for "bounds check" is preserved to ensure that
refactoring doesn't accidentally break it (i.e. create values of `cnt`
that are out of bounds with the masking causing it to silently wrap-
around).

Before:

    test test::rand_isaac   ... bench: 990 ns/iter (+/- 24) = 808 MB/s
    test test::rand_isaac64 ... bench: 614 ns/iter (+/- 25) = 1302 MB/s

After:

    test test::rand_isaac   ... bench: 877 ns/iter (+/- 134) = 912 MB/s
    test test::rand_isaac64 ... bench: 470 ns/iter (+/- 30) = 1702 MB/s

(It also removes the unsafe code in Isaac64Rng.next_u64, with a *gain*
in performance; today is a good day.)

9 years agoauto merge of #17036 : pczarn/rust/issue-15913-ICE-with-call-trans, r=alexcrichton
bors [Mon, 8 Sep 2014 08:06:18 +0000 (08:06 +0000)]
auto merge of #17036 : pczarn/rust/issue-15913-ICE-with-call-trans, r=alexcrichton

A match in callee.rs was recognizing some foreign fns as named tuple constructors. A reproducible test case for this is nearly impossible since it depends on the way NodeIds happen to be assigned in different crates.

Fixes #15913

9 years agoRelicense shootout-chameneos-redux.rs to the shootout license.
Guillaume Pinot [Mon, 8 Sep 2014 06:43:21 +0000 (08:43 +0200)]
Relicense shootout-chameneos-redux.rs to the shootout license.

Everyone agreed. fix #17076

9 years agoAdd ICE regression test with unboxed closures
Nathan Typanski [Mon, 8 Sep 2014 03:45:27 +0000 (23:45 -0400)]
Add ICE regression test with unboxed closures

This code used to produce the following ICE:

   error: internal compiler error: get_unique_type_id_of_type() -
   unexpected type: closure,
   ty_unboxed_closure(syntax::ast::DefId{krate: 0u32, node: 66u32},
   ReScope(63u32))

This is a regression test for issue #17021.

9 years agoauto merge of #16933 : nick29581/rust/dst-rvalue, r=nikomatsakis
bors [Mon, 8 Sep 2014 02:36:15 +0000 (02:36 +0000)]
auto merge of #16933 : nick29581/rust/dst-rvalue, r=nikomatsakis

Closes #16813

r? @nikomatsakis I feel like I should be checking more things in check_rvalues, but not sure what - I don't properly understand expr_use_visitor

9 years agolibnative/io: generic retry() for Unix 64 bit read/write().
NODA, Kai [Fri, 5 Sep 2014 07:05:22 +0000 (15:05 +0800)]
libnative/io: generic retry() for Unix 64 bit read/write().

Win32/WinSock APIs never call WSASetLastError() with WSAEINTR
unless a programmer specifically cancels the ongoing blocking call by
a deprecated WinSock1 API WSACancelBlockingCall().
So the errno check was simply removed and retry() became an id function
on Windows.
Note: Windows' equivalent of SIGINT is always handled in a separate thread:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682541%28v=vs.85%29.aspx
"CTRL+C and CTRL+BREAK Signals"

Also, incidentally rename a type parameter and clean up some module imports.

9 years agorustdoc: Don't strip #-lines if notrust
Alex Crichton [Sun, 7 Sep 2014 23:42:58 +0000 (16:42 -0700)]
rustdoc: Don't strip #-lines if notrust

Other languages may not want to have a leading #-line get stripped.

9 years agoauto merge of #16942 : alexcrichton/rust/remove-net-assert, r=brson
bors [Sun, 7 Sep 2014 23:01:34 +0000 (23:01 +0000)]
auto merge of #16942 : alexcrichton/rust/remove-net-assert, r=brson

This assert was likely inherited from some point, but it's not quite valid as a
no-timeout read may enter this loop, but data could be stolen by any other read
after the socket is deemed readable.

I saw this fail in a recent bors run where the assertion was tripped.

9 years agoAllow Rust to be built with LLVM trunk (3.6).
Dan Albert [Sun, 7 Sep 2014 21:42:48 +0000 (14:42 -0700)]
Allow Rust to be built with LLVM trunk (3.6).

9 years agoForbid unsized rvalues
Nick Cameron [Tue, 2 Sep 2014 03:55:07 +0000 (15:55 +1200)]
Forbid unsized rvalues

Closes #16813

9 years agoauto merge of #17035 : huonw/rust/moar-jquery, r=alexcrichton
bors [Sun, 7 Sep 2014 21:06:29 +0000 (21:06 +0000)]
auto merge of #17035 : huonw/rust/moar-jquery, r=alexcrichton

Sometimes (e.g. on Rust CI) the "expand description" text of the
collapse toggle was displayed by default, when a page is first
loaded (even though the description is expanded), because some
Content-Security-Policy settings disable inline CSS.

Setting it the style with the `.css` method allows the output to be used
in more places.

9 years agoFix casts in constant expressions
Jakub Wieczorek [Sun, 7 Sep 2014 18:45:12 +0000 (20:45 +0200)]
Fix casts in constant expressions

Fixes #17074.

9 years agoauto merge of #16904 : inrustwetrust/rust/link-path-order, r=alexcrichton
bors [Sun, 7 Sep 2014 19:06:28 +0000 (19:06 +0000)]
auto merge of #16904 : inrustwetrust/rust/link-path-order, r=alexcrichton

Issue can be reproduced by the following:
```
$ cat main.rs
fn main() {}
$ rustc -Z print-link-args -Lfoo -Lbar main.rs
```
Run the rustc command a few times and observe that the order of the '-L' 'foo' '-L' 'bar' options randomly changes.

Actually hit this issue in practice on Windows when specifying two -L directories to rustc, one with rust-sdl2 in it and one with the C SDL2.dll. Since Windows file systems aren't case-sensitive, gcc randomly attempted to link against the rust sdl2.dll instead of SDL2.dll if that -L directory happened to come first.

The randomness was due to addl_lib_search_paths being a HashSet. Changed it to a Vec instead which maintains the ordering.
Unsure how to test this though since it is random by nature; suggestions very welcome.

9 years agoenable jemalloc debugging in unoptimized builds
Daniel Micay [Sun, 7 Sep 2014 18:05:32 +0000 (14:05 -0400)]
enable jemalloc debugging in unoptimized builds

The performance hit from these checks is significant, but unoptimized
builds are already incredibly slow. Enabling these checks results in
better test coverage since there are bots doing unoptimized builds, and
the cost is relatively small in the context of an unoptimized build.
This also allows using `JEMALLOC_FLAGS` to override the default
configure flags.

9 years agoFlip arguments to `std::iter::iterate`.
Jonas Hietala [Sun, 7 Sep 2014 17:06:13 +0000 (19:06 +0200)]
Flip arguments to `std::iter::iterate`.

Breaks `iterate(f, seed)`, use `iterate(seed, f)` instead.
The convention is to have the closure last.

Closes #17066.

[breaking-change]

9 years agoRelicense shootout-nbody.rs to the shootout license
Guillaume Pinot [Sun, 7 Sep 2014 17:16:55 +0000 (19:16 +0200)]
Relicense shootout-nbody.rs to the shootout license

Everyone agreed. fix #17073

9 years agoauto merge of #17015 : seb-m/rust/fix-extern-crate-as, r=sfackler
bors [Sun, 7 Sep 2014 16:21:29 +0000 (16:21 +0000)]
auto merge of #17015 : seb-m/rust/fix-extern-crate-as, r=sfackler

Its arguments were inverted.

For instance it displayed this message:

```
warning: this extern crate syntax is deprecated. Use: extern create "foobar" as foo;
```

Instead of:

```
warning: this extern crate syntax is deprecated. Use: extern create "foo" as foobar;
```

9 years agoRelicense shootout-reverse-complement.rs to the shootout license.
Guillaume Pinot [Sun, 7 Sep 2014 16:09:01 +0000 (18:09 +0200)]
Relicense shootout-reverse-complement.rs to the shootout license.

Everyone agreed.  Fix #17065

9 years agoFix deprecate warning "extern crate ... as ..."
Sebastien Martini [Fri, 5 Sep 2014 09:42:16 +0000 (11:42 +0200)]
Fix deprecate warning "extern crate ... as ..."

Its arguments were inverted.

9 years agoauto merge of #17034 : retep998/rust/glob-fix, r=alexcrichton
bors [Sun, 7 Sep 2014 14:31:24 +0000 (14:31 +0000)]
auto merge of #17034 : retep998/rust/glob-fix, r=alexcrichton

Fixes #15279
Based on #13338

9 years agoauto merge of #17005 : bjz/rust/bit-count, r=thestinger
bors [Sun, 7 Sep 2014 12:41:25 +0000 (12:41 +0000)]
auto merge of #17005 : bjz/rust/bit-count, r=thestinger

Fixes rust-lang/rfcs#224

9 years agoRegister snapshots.
Huon Wilson [Sun, 7 Sep 2014 10:42:14 +0000 (20:42 +1000)]
Register snapshots.

Closes #16880.

9 years agoAdded test for link path ordering
inrustwetrust [Thu, 4 Sep 2014 20:41:00 +0000 (22:41 +0200)]
Added test for link path ordering

9 years agoChanged addl_lib_search_paths from HashSet to Vec
inrustwetrust [Sun, 31 Aug 2014 17:07:27 +0000 (19:07 +0200)]
Changed addl_lib_search_paths from HashSet to Vec

This makes the extra library paths given to the gcc linker come in
the same order as the -L options on the rustc command line.

9 years agoFix vector/array/slice terminology in manual.
Steve Klabnik [Thu, 28 Aug 2014 18:29:48 +0000 (14:29 -0400)]
Fix vector/array/slice terminology in manual.

Fixes #16015.

9 years agoauto merge of #17032 : jamesluke/rust/master, r=alexcrichton
bors [Sun, 7 Sep 2014 09:26:27 +0000 (09:26 +0000)]
auto merge of #17032 : jamesluke/rust/master, r=alexcrichton

"extern create" -> "extern crate"

9 years agoAdd regression test for issue #10766
Nathan Typanski [Sun, 7 Sep 2014 05:31:41 +0000 (01:31 -0400)]
Add regression test for issue #10766

This test verifies that casting from the same lifetime on a value
to the same lifetime on a trait succeeds. Closes #10766.

9 years agoAdd ICE regression test for issue #16218.
Nathan Typanski [Sun, 7 Sep 2014 05:43:02 +0000 (01:43 -0400)]
Add ICE regression test for issue #16218.

This code used to produce an ICE on the definition of trait Bar
with the following message:

Type parameter out of range when substituting in region 'a (root
type=fn(Self) -> 'astr) (space=FnSpace, index=0)

Closes #16218.

9 years agoauto merge of #17019 : steveklabnik/rust/remove_compromise, r=thestinger
bors [Sun, 7 Sep 2014 07:16:27 +0000 (07:16 +0000)]
auto merge of #17019 : steveklabnik/rust/remove_compromise, r=thestinger

@dherman doesn't like it :smile:

9 years agoauto merge of #17018 : steveklabnik/rust/fix_projects_in_guide, r=huonw
bors [Sun, 7 Sep 2014 05:31:25 +0000 (05:31 +0000)]
auto merge of #17018 : steveklabnik/rust/fix_projects_in_guide, r=huonw

Thanks @dherman.

9 years agoauto merge of #17016 : steveklabnik/rust/fix_diagnostic_codes, r=huonw
bors [Sun, 7 Sep 2014 03:36:27 +0000 (03:36 +0000)]
auto merge of #17016 : steveklabnik/rust/fix_diagnostic_codes, r=huonw

Fixes #16449.

9 years agoauto merge of #16999 : brson/rust/fannkuch, r=alexcrichton
bors [Sun, 7 Sep 2014 00:31:28 +0000 (00:31 +0000)]
auto merge of #16999 : brson/rust/fannkuch, r=alexcrichton

From the discussion on reddit:
http://www.reddit.com/r/rust/comments/2fenlg/benchmark_improvement_fannkuchredux/

This adds two variants: the primary, that uses an unsafe block, and a secondary
that is completely safe.

The one with the unsafe block matches clang's performance and beats gcc's.

9 years agomark win32 binaries as large address aware
Daniel Micay [Sat, 6 Sep 2014 21:51:25 +0000 (17:51 -0400)]
mark win32 binaries as large address aware

By default, 32-bit Windows executables are restricted to 2GiB of address
space even when running on 64-bit Windows when 4GiB is available.

Closes #17043

9 years agoauto merge of #17012 : thestinger/rust/sized, r=nikomatsakis
bors [Sat, 6 Sep 2014 21:46:25 +0000 (21:46 +0000)]
auto merge of #17012 : thestinger/rust/sized, r=nikomatsakis

9 years agofix sized deallocation for TypedArena<T>
Daniel Micay [Fri, 5 Sep 2014 13:08:30 +0000 (09:08 -0400)]
fix sized deallocation for TypedArena<T>

9 years agofix sized deallocation for OwnedSlice
Daniel Micay [Fri, 5 Sep 2014 10:19:15 +0000 (06:19 -0400)]
fix sized deallocation for OwnedSlice

9 years agofix sized deallocation for Box<[T]>
Daniel Micay [Fri, 5 Sep 2014 07:39:15 +0000 (03:39 -0400)]
fix sized deallocation for Box<[T]>

9 years agoauto merge of #17011 : nodakai/rust/rustdoc-stronger-crate, r=alexcrichton
bors [Sat, 6 Sep 2014 17:51:24 +0000 (17:51 +0000)]
auto merge of #17011 : nodakai/rust/rustdoc-stronger-crate, r=alexcrichton

If you browse to, say, http://doc.rust-lang.org/libc/types/os/common/posix01/struct.timeval.html , you will see the "location" window showing `libc::types::os::common::posix01`.  The first element points to a crate and others point modules.  This patch adds the bold attribute to the first (ie. crate) element so that it stands out more.

9 years agofix sized deallocation for proc
Daniel Micay [Fri, 5 Sep 2014 05:07:51 +0000 (01:07 -0400)]
fix sized deallocation for proc

9 years agofix a sized deallocation issue in the glue code
Daniel Micay [Fri, 5 Sep 2014 03:58:39 +0000 (23:58 -0400)]
fix a sized deallocation issue in the glue code

9 years agoreaddir: return error instead of failing on invalid UTF-16
Peter Atashian [Sat, 6 Sep 2014 16:51:42 +0000 (12:51 -0400)]
readdir: return error instead of failing on invalid UTF-16
Fixes #15279

Signed-off-by: Peter Atashian <retep998@gmail.com>
9 years agoauto merge of #17003 : nick29581/rust/impl, r=pcwalton
bors [Sat, 6 Sep 2014 14:51:26 +0000 (14:51 +0000)]
auto merge of #17003 : nick29581/rust/impl, r=pcwalton

closes #16955

r? @pcwalton

9 years agoauto merge of #17002 : tari/rust/std-mut-ref-slice, r=alexcrichton
bors [Sat, 6 Sep 2014 13:06:27 +0000 (13:06 +0000)]
auto merge of #17002 : tari/rust/std-mut-ref-slice, r=alexcrichton

`std::slice` exported `ref_slice` but not `mut_ref_slice`. This change makes it export both.

9 years agoFix ICE with trans of calls to foreign fns
Piotr Czarnecki [Sat, 6 Sep 2014 00:46:05 +0000 (01:46 +0100)]
Fix ICE with trans of calls to foreign fns

It was failing occasionally.

9 years agorustc: Refactor middle::trans::inline
Piotr Czarnecki [Sat, 6 Sep 2014 00:39:51 +0000 (01:39 +0100)]
rustc: Refactor middle::trans::inline

9 years agoauto merge of #16997 : gamazeps/rust/master, r=huonw
bors [Sat, 6 Sep 2014 10:31:29 +0000 (10:31 +0000)]
auto merge of #16997 : gamazeps/rust/master, r=huonw

Changed the names according to the issue #16988

9 years agoauto merge of #16907 : SimonSapin/rust/tempdir-result, r=huonw
bors [Sat, 6 Sep 2014 08:01:33 +0000 (08:01 +0000)]
auto merge of #16907 : SimonSapin/rust/tempdir-result, r=huonw

This allows using `try!()`

[breaking-change]

Fixes #16875

9 years agoauto merge of #16367 : epdtry/rust/parallel-codegen, r=alexcrichton
bors [Sat, 6 Sep 2014 06:06:35 +0000 (06:06 +0000)]
auto merge of #16367 : epdtry/rust/parallel-codegen, r=alexcrichton

This branch adds support for running LLVM optimization and codegen on different parts of a crate in parallel.  Instead of translating the crate into a single LLVM compilation unit, `rustc` now distributes items in the crate among several compilation units, and spawns worker threads to optimize and codegen each compilation unit independently.  This improves compile times on multicore machines, at the cost of worse performance in the compiled code.  The intent is to speed up build times during development without sacrificing too much optimization.

On the machine I tested this on, `librustc` build time with `-O` went from 265 seconds (master branch, single-threaded) to 115s (this branch, with 4 threads), a speedup of 2.3x.  For comparison, the build time without `-O` was 90s (single-threaded).  Bootstrapping `rustc` using 4 threads gets a 1.6x speedup over the default settings (870s vs. 1380s), and building `librustc` with the resulting stage2 compiler takes 1.3x as long as the master branch (44s vs.  55s, single threaded, ignoring time spent in LLVM codegen).

The user-visible changes from this branch are two new codegen flags:

 * `-C codegen-units=N`: Distribute items across `N` compilation units.
 * `-C codegen-threads=N`: Spawn `N` worker threads for running optimization and codegen.  (It is possible to set `codegen-threads` larger than `codegen-units`, but this is not very useful.)

Internal changes to the compiler are described in detail on the individual commit messages.

Note: The first commit on this branch is copied from #16359, which this branch depends on.

r? @nick29581

9 years agoauto merge of #17039 : vadimcn/rust/test_lots_of_files, r=alexcrichton
bors [Sat, 6 Sep 2014 03:31:34 +0000 (03:31 +0000)]
auto merge of #17039 : vadimcn/rust/test_lots_of_files, r=alexcrichton

9 years agoDisable test_lots_of_files on Windows
Vadim Chugunov [Sat, 6 Sep 2014 02:48:33 +0000 (19:48 -0700)]
Disable test_lots_of_files on Windows

9 years agoUse more jQuery to avoid displaying Expand Description more often.
Huon Wilson [Sat, 6 Sep 2014 00:35:19 +0000 (10:35 +1000)]
Use more jQuery to avoid displaying Expand Description more often.

Sometimes (e.g. on Rust CI) the "expand description" text of the
collapse toggle was displayed by default, when a page is first
loaded (even though the description is expanded), because some
Content-Security-Policy settings disable inline CSS.

Setting it the style with the `.css` method allows the output to be used
in more places.