]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #28494 - bluss:vecdeque-zst, r=eddyb
bors [Sat, 19 Sep 2015 14:23:46 +0000 (14:23 +0000)]
Auto merge of #28494 - bluss:vecdeque-zst, r=eddyb

VecDeque: Use power of two capacity even for zero sized types

VecDeque depends on using a power of two capacity. Use the largest
possible power of two capacity for ZSTs.

Fixes #28488

8 years agoAuto merge of #28495 - semarie:stdcpp-name, r=alexcrichton
bors [Sat, 19 Sep 2015 12:35:23 +0000 (12:35 +0000)]
Auto merge of #28495 - semarie:stdcpp-name, r=alexcrichton

it makes rustc compatible with gcc installation that are using
`--program-transform-name' configure flag (on OpenBSD for example).

- detects at configure the name of stdc++ library on the system

- use the detected name in llvm makefile (with enable-static-stdcpp),
  and pass it to mklldeps.py

- generate mklldeps.rs using this detected name

note that CFG_STDCPP_NAME is about stdc++ name, not about libc++. If
using libc++, the default name will be `stdc++', but it won't be used
when linking.

r? @alexcrichton

I added this support globally instead of just for OpenBSD as it isn't specially related to OpenBSD (except OpenBSD use it for gcc-4.9). And as I would had to change `llvm.mk', having just a default value in `configure' for others platforms won't be very useful.

8 years agoVecDeque: Use power of two capacity even for zero sized types
Ulrik Sverdrup [Fri, 18 Sep 2015 14:32:52 +0000 (16:32 +0200)]
VecDeque: Use power of two capacity even for zero sized types

VecDeque depends on using a power of two capacity. Use the largest
possible power of two capacity for ZSTs.

8 years agoAuto merge of #28491 - dotdash:noadjust, r=nikomatsakis
bors [Sat, 19 Sep 2015 08:26:55 +0000 (08:26 +0000)]
Auto merge of #28491 - dotdash:noadjust, r=nikomatsakis

That allows us to keep using trans_into() in case of adjustments that
may actually be ignored in trans because they are a plain deref/ref pair
with no overloaded deref or unsizing.

Unoptimized(!) benchmarks from servo/servo#7638

Before
```
test goser::bench_clone                          ... bench:      17,701 ns/iter (+/- 58) = 30 MB/s
test goser::bincode::bench_decoder               ... bench:      33,715 ns/iter (+/- 300) = 11 MB/s
test goser::bincode::bench_deserialize           ... bench:      36,804 ns/iter (+/- 329) = 9 MB/s
test goser::bincode::bench_encoder               ... bench:      34,695 ns/iter (+/- 149) = 11 MB/s
test goser::bincode::bench_populate              ... bench:      18,879 ns/iter (+/- 88)
test goser::bincode::bench_serialize             ... bench:      31,668 ns/iter (+/- 156) = 11 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,049 ns/iter (+/- 87) = 218 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,707 ns/iter (+/- 258) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         635 ns/iter (+/- 5)
test goser::capnp::bench_serialize               ... bench:      35,657 ns/iter (+/- 155) = 12 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      37,881 ns/iter (+/- 146) = 8 MB/s
test goser::msgpack::bench_decoder               ... bench:      50,634 ns/iter (+/- 307) = 5 MB/s
test goser::msgpack::bench_encoder               ... bench:      25,738 ns/iter (+/- 90) = 11 MB/s
test goser::msgpack::bench_populate              ... bench:      18,900 ns/iter (+/- 138)
test goser::protobuf::bench_decoder              ... bench:       2,791 ns/iter (+/- 29) = 102 MB/s
test goser::protobuf::bench_encoder              ... bench:      75,414 ns/iter (+/- 358) = 3 MB/s
test goser::protobuf::bench_populate             ... bench:      19,248 ns/iter (+/- 92)
test goser::rustc_serialize_json::bench_decoder  ... bench:     109,999 ns/iter (+/- 797) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      58,777 ns/iter (+/- 418) = 10 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      18,887 ns/iter (+/- 76)
test goser::serde_json::bench_deserializer       ... bench:     104,803 ns/iter (+/- 770) = 5 MB/s
test goser::serde_json::bench_populate           ... bench:      18,890 ns/iter (+/- 69)
test goser::serde_json::bench_serializer         ... bench:      75,046 ns/iter (+/- 435) = 8 MB/s
```

After
```
test goser::bench_clone                          ... bench:      16,052 ns/iter (+/- 188) = 34 MB/s
test goser::bincode::bench_decoder               ... bench:      31,194 ns/iter (+/- 941) = 12 MB/s
test goser::bincode::bench_deserialize           ... bench:      33,934 ns/iter (+/- 352) = 10 MB/s
test goser::bincode::bench_encoder               ... bench:      30,737 ns/iter (+/- 1,969) = 13 MB/s
test goser::bincode::bench_populate              ... bench:      17,234 ns/iter (+/- 176)
test goser::bincode::bench_serialize             ... bench:      28,269 ns/iter (+/- 452) = 12 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,019 ns/iter (+/- 85) = 221 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,662 ns/iter (+/- 527) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         607 ns/iter (+/- 2)
test goser::capnp::bench_serialize               ... bench:      30,488 ns/iter (+/- 219) = 14 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      33,731 ns/iter (+/- 201) = 9 MB/s
test goser::msgpack::bench_decoder               ... bench:      46,921 ns/iter (+/- 461) = 6 MB/s
test goser::msgpack::bench_encoder               ... bench:      22,315 ns/iter (+/- 96) = 12 MB/s
test goser::msgpack::bench_populate              ... bench:      17,268 ns/iter (+/- 73)
test goser::protobuf::bench_decoder              ... bench:       2,658 ns/iter (+/- 44) = 107 MB/s
test goser::protobuf::bench_encoder              ... bench:      71,024 ns/iter (+/- 359) = 4 MB/s
test goser::protobuf::bench_populate             ... bench:      17,704 ns/iter (+/- 104)
test goser::rustc_serialize_json::bench_decoder  ... bench:     107,867 ns/iter (+/- 759) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      52,327 ns/iter (+/- 479) = 11 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      17,262 ns/iter (+/- 68)
test goser::serde_json::bench_deserializer       ... bench:      99,156 ns/iter (+/- 657) = 6 MB/s
test goser::serde_json::bench_populate           ... bench:      17,264 ns/iter (+/- 77)
test goser::serde_json::bench_serializer         ... bench:      66,135 ns/iter (+/- 392) = 9 MB/s

```

8 years agoAuto merge of #28489 - kud1ing:patch-1, r=alexcrichton
bors [Sat, 19 Sep 2015 06:38:55 +0000 (06:38 +0000)]
Auto merge of #28489 - kud1ing:patch-1, r=alexcrichton

As of http://blog.rust-lang.org/2015/09/17/Rust-1.3.html

8 years agoAuto merge of #28486 - nrc:pub-extern-crate, r=alexcrichton
bors [Sat, 19 Sep 2015 04:51:13 +0000 (04:51 +0000)]
Auto merge of #28486 - nrc:pub-extern-crate, r=alexcrichton

Temporary 'fix' for #26775

r? @brson

8 years agoAuto merge of #28468 - nagisa:revert-negate-unsigned-warning, r=alexcrichton
bors [Sat, 19 Sep 2015 01:59:56 +0000 (01:59 +0000)]
Auto merge of #28468 - nagisa:revert-negate-unsigned-warning, r=alexcrichton

This reverts commit 0ca8e4994ee43ba9dfbded6e129b30ff5fe7a994.

Fixes #27141

8 years agoAuto merge of #28484 - nrc:fix-save, r=alexcrichton
bors [Sat, 19 Sep 2015 00:08:38 +0000 (00:08 +0000)]
Auto merge of #28484 - nrc:fix-save, r=alexcrichton

Should be lowering ast expressions to HIR expressions, not cheating via the hir map. That goes wrong now that there is not a 1:1 mapping between ast and hir (in the case of the crash due to ExprParen).

8 years agoAuto merge of #28465 - apasel422:tidy, r=alexcrichton
bors [Fri, 18 Sep 2015 20:43:34 +0000 (20:43 +0000)]
Auto merge of #28465 - apasel422:tidy, r=alexcrichton

It is likely that these were committed by mistake.

8 years agoAuto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichton
bors [Fri, 18 Sep 2015 18:51:04 +0000 (18:51 +0000)]
Auto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichton

Followup on #28440

Do not merge before the referenced PR is merged. I will fix the PR once that is merged (or close if it is not)

8 years agoRevert "Convert negate_unsigned feature gate to a warning"
Simonas Kazlauskas [Thu, 17 Sep 2015 20:09:28 +0000 (23:09 +0300)]
Revert "Convert negate_unsigned feature gate to a warning"

This reverts commit 0ca8e4994ee43ba9dfbded6e129b30ff5fe7a994 and fixes the code to work with
current rustc.

Fixes #27141

8 years agoAuto merge of #28336 - petrochenkov:empstr, r=pnkfelix
bors [Fri, 18 Sep 2015 16:57:21 +0000 (16:57 +0000)]
Auto merge of #28336 - petrochenkov:empstr, r=pnkfelix

Closes https://github.com/rust-lang/rust/issues/24266
Closes https://github.com/rust-lang/rust/issues/16819

8 years agoadd support for non-standard name of stdc++ library
Sébastien Marie [Fri, 18 Sep 2015 14:30:45 +0000 (16:30 +0200)]
add support for non-standard name of stdc++ library

it makes rustc compatible with gcc installation that are using
`--program-transform-name' configure flag (on OpenBSD for example).

- detects at configure the name of stdc++ library on the system

- use the detected name in llvm makefile (with enable-static-stdcpp),
  and pass it to mklldeps.py

- generate mklldeps.rs using this detected name

note that CFG_STDCPP_NAME is about stdc++ name, not about libc++. If
using libc++, the default name will be `stdc++', but it won't be used
when linking.

8 years agoAuto merge of #28492 - Ms2ger:a-name, r=steveklabnik
bors [Fri, 18 Sep 2015 14:06:51 +0000 (14:06 +0000)]
Auto merge of #28492 - Ms2ger:a-name, r=steveklabnik

The id attribute has been an official part of HTML since 1997. There is no
reason not to use it.

8 years agoUse divs with ids rather than as with names.
Ms2ger [Fri, 18 Sep 2015 13:52:19 +0000 (15:52 +0200)]
Use divs with ids rather than as with names.

The id attribute has been an official part of HTML since 1997. There is no
reason not to use it.

8 years agoSkip no-op adjustments in trans
Björn Steinbrink [Fri, 18 Sep 2015 13:46:58 +0000 (15:46 +0200)]
Skip no-op adjustments in trans

That allows us to keep using trans_into() in case of adjustments that
may actually be ignored in trans because they are a plain deref/ref pair
with no overloaded deref or unsizing.

Unoptimized(!) benchmarks from servo/servo#7638

Before
```
test goser::bench_clone                          ... bench:      17,701 ns/iter (+/- 58) = 30 MB/s
test goser::bincode::bench_decoder               ... bench:      33,715 ns/iter (+/- 300) = 11 MB/s
test goser::bincode::bench_deserialize           ... bench:      36,804 ns/iter (+/- 329) = 9 MB/s
test goser::bincode::bench_encoder               ... bench:      34,695 ns/iter (+/- 149) = 11 MB/s
test goser::bincode::bench_populate              ... bench:      18,879 ns/iter (+/- 88)
test goser::bincode::bench_serialize             ... bench:      31,668 ns/iter (+/- 156) = 11 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,049 ns/iter (+/- 87) = 218 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,707 ns/iter (+/- 258) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         635 ns/iter (+/- 5)
test goser::capnp::bench_serialize               ... bench:      35,657 ns/iter (+/- 155) = 12 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      37,881 ns/iter (+/- 146) = 8 MB/s
test goser::msgpack::bench_decoder               ... bench:      50,634 ns/iter (+/- 307) = 5 MB/s
test goser::msgpack::bench_encoder               ... bench:      25,738 ns/iter (+/- 90) = 11 MB/s
test goser::msgpack::bench_populate              ... bench:      18,900 ns/iter (+/- 138)
test goser::protobuf::bench_decoder              ... bench:       2,791 ns/iter (+/- 29) = 102 MB/s
test goser::protobuf::bench_encoder              ... bench:      75,414 ns/iter (+/- 358) = 3 MB/s
test goser::protobuf::bench_populate             ... bench:      19,248 ns/iter (+/- 92)
test goser::rustc_serialize_json::bench_decoder  ... bench:     109,999 ns/iter (+/- 797) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      58,777 ns/iter (+/- 418) = 10 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      18,887 ns/iter (+/- 76)
test goser::serde_json::bench_deserializer       ... bench:     104,803 ns/iter (+/- 770) = 5 MB/s
test goser::serde_json::bench_populate           ... bench:      18,890 ns/iter (+/- 69)
test goser::serde_json::bench_serializer         ... bench:      75,046 ns/iter (+/- 435) = 8 MB/s
```

After
```
test goser::bench_clone                          ... bench:      16,052 ns/iter (+/- 188) = 34 MB/s
test goser::bincode::bench_decoder               ... bench:      31,194 ns/iter (+/- 941) = 12 MB/s
test goser::bincode::bench_deserialize           ... bench:      33,934 ns/iter (+/- 352) = 10 MB/s
test goser::bincode::bench_encoder               ... bench:      30,737 ns/iter (+/- 1,969) = 13 MB/s
test goser::bincode::bench_populate              ... bench:      17,234 ns/iter (+/- 176)
test goser::bincode::bench_serialize             ... bench:      28,269 ns/iter (+/- 452) = 12 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,019 ns/iter (+/- 85) = 221 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,662 ns/iter (+/- 527) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         607 ns/iter (+/- 2)
test goser::capnp::bench_serialize               ... bench:      30,488 ns/iter (+/- 219) = 14 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      33,731 ns/iter (+/- 201) = 9 MB/s
test goser::msgpack::bench_decoder               ... bench:      46,921 ns/iter (+/- 461) = 6 MB/s
test goser::msgpack::bench_encoder               ... bench:      22,315 ns/iter (+/- 96) = 12 MB/s
test goser::msgpack::bench_populate              ... bench:      17,268 ns/iter (+/- 73)
test goser::protobuf::bench_decoder              ... bench:       2,658 ns/iter (+/- 44) = 107 MB/s
test goser::protobuf::bench_encoder              ... bench:      71,024 ns/iter (+/- 359) = 4 MB/s
test goser::protobuf::bench_populate             ... bench:      17,704 ns/iter (+/- 104)
test goser::rustc_serialize_json::bench_decoder  ... bench:     107,867 ns/iter (+/- 759) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      52,327 ns/iter (+/- 479) = 11 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      17,262 ns/iter (+/- 68)
test goser::serde_json::bench_deserializer       ... bench:      99,156 ns/iter (+/- 657) = 6 MB/s
test goser::serde_json::bench_populate           ... bench:      17,264 ns/iter (+/- 77)
test goser::serde_json::bench_serializer         ... bench:      66,135 ns/iter (+/- 392) = 9 MB/s

```

8 years agoAdd feature gate
Vadim Petrochenkov [Fri, 18 Sep 2015 10:36:45 +0000 (13:36 +0300)]
Add feature gate

8 years agoAdd some more tests
Vadim Petrochenkov [Fri, 11 Sep 2015 11:03:38 +0000 (14:03 +0300)]
Add some more tests

8 years agoImplement empty struct with braces (RFC 218)
Vadim Petrochenkov [Thu, 10 Sep 2015 19:46:52 +0000 (22:46 +0300)]
Implement empty struct with braces (RFC 218)

8 years agoAdd 1.3 release date
kud1ing [Fri, 18 Sep 2015 07:19:20 +0000 (09:19 +0200)]
Add 1.3 release date

As of http://blog.rust-lang.org/2015/09/17/Rust-1.3.html

8 years agoWarn on `pub extern crate`.
Nick Cameron [Fri, 18 Sep 2015 06:07:05 +0000 (18:07 +1200)]
Warn on `pub extern crate`.

Temporary 'fix' for #26775

8 years agoFix crash with --save-analysis
Nick Cameron [Fri, 18 Sep 2015 04:41:11 +0000 (16:41 +1200)]
Fix crash with --save-analysis

Should be lowering ast expressions to HIR expressions, not cheating via the hir map. That goes wrong now that there is not a 1:1 mapping between ast and hir (in the case of the crash due to ExprParen).

8 years agoAuto merge of #28476 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 17 Sep 2015 21:34:34 +0000 (21:34 +0000)]
Auto merge of #28476 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28276, #28314, #28422, #28435, #28451, #28466, #28470, #28471, #28473, #28474
- Failed merges:

8 years agoRollup merge of #28474 - tshepang:repetition, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28474 - tshepang:repetition, r=steveklabnik

It's clear it's the one being documented

8 years agoRollup merge of #28473 - tshepang:lowercase, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28473 - tshepang:lowercase, r=steveklabnik

8 years agoRollup merge of #28471 - tshepang:markup, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28471 - tshepang:markup, r=steveklabnik

8 years agoRollup merge of #28470 - tshepang:idiom, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28470 - tshepang:idiom, r=steveklabnik

8 years agoRollup merge of #28466 - baskerville:trpl-heap-highest-addr, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:55 +0000 (17:06 -0400)]
Rollup merge of #28466 - baskerville:trpl-heap-highest-addr, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #28451 - dagnir:osx-req-wording, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:55 +0000 (17:06 -0400)]
Rollup merge of #28451 - dagnir:osx-req-wording, r=steveklabnik

Using "later" in this context makes more sense than "greater" so it's been changed to match the Linux requirement above it rather than the other way around.

8 years agoRollup merge of #28435 - apasel422:issue-24533, r=nikomatsakis
Steve Klabnik [Thu, 17 Sep 2015 21:06:55 +0000 (17:06 -0400)]
Rollup merge of #28435 - apasel422:issue-24533, r=nikomatsakis

Closes #24533.

8 years agoRollup merge of #28422 - christopherdumas:label_code, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:54 +0000 (17:06 -0400)]
Rollup merge of #28422 - christopherdumas:label_code, r=steveklabnik

8 years agoRollup merge of #28314 - tbu-:pr_atomics_are_send, r=brson
Steve Klabnik [Thu, 17 Sep 2015 21:06:54 +0000 (17:06 -0400)]
Rollup merge of #28314 - tbu-:pr_atomics_are_send, r=brson

8 years agoRollup merge of #28276 - jackwilsonv:patch-5, r=Manishearth
Steve Klabnik [Thu, 17 Sep 2015 21:06:54 +0000 (17:06 -0400)]
Rollup merge of #28276 - jackwilsonv:patch-5, r=Manishearth

8 years agoreference: actual keywords feel more appropriate
Tshepang Lekhonkhobe [Thu, 17 Sep 2015 20:24:15 +0000 (22:24 +0200)]
reference: actual keywords feel more appropriate

8 years agoreference: mark that up to make it more clear it is a keyword
Tshepang Lekhonkhobe [Thu, 17 Sep 2015 20:52:39 +0000 (22:52 +0200)]
reference: mark that up to make it more clear it is a keyword

8 years agodoc: follow idiom in code snippet
Tshepang Lekhonkhobe [Thu, 17 Sep 2015 20:13:05 +0000 (22:13 +0200)]
doc: follow idiom in code snippet

8 years agoAuto merge of #28459 - apasel422:tests, r=alexcrichton
bors [Thu, 17 Sep 2015 19:50:31 +0000 (19:50 +0000)]
Auto merge of #28459 - apasel422:tests, r=alexcrichton

Closes #23543.
Closes #23544.

8 years agodoc: no need to mention the method by name
Tshepang Lekhonkhobe [Thu, 17 Sep 2015 19:46:46 +0000 (21:46 +0200)]
doc: no need to mention the method by name

It's clear it's the one being documented

8 years agoAuto merge of #28457 - VHaravy:test-run-pass-x86stdcall2, r=huonw
bors [Thu, 17 Sep 2015 18:06:33 +0000 (18:06 +0000)]
Auto merge of #28457 - VHaravy:test-run-pass-x86stdcall2, r=huonw

Type `HANDLE` is defined on Windows as `PVOID`. Test `run-pass/x86stdcall2` defined it as `u32` that caused access violation in `catch_panic` routine at the line:

```
try!(unwind::try(move || *result = Some(f())))
```

The original failure is as follows:

```
---- [run-pass] run-pass/x86stdcall2.rs stdout ----

error: test run failed!
status: exit code: -1073741819
command: PATH="x86_64-pc-windows-msvc/stage2/bin/rustlib/x86_64-pc-windows-msvc/lib;D:\Sources\Rust\x86_64-pc-windows-msvc\stage2\bin;C:\MSYS2\mingw64\bin;C:\MSYS2\usr\local\bin;C:\MSYS2\usr\bin;C:\MSYS2\usr\bin;C:\Program Files\Python 3;C:\Program Files\Python 3\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\SlikSvn\bin;C:\Program Files\System Tools;C:\Program Files (x86)\System Tools;C:\Program Files\Vim\vim74;C:\Program Files\Rust\bin;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\MiKTeX\miktex\bin\x64;C:\Program Files (x86)\Pandoc;C:\Program Files\LLVM\bin;C:\Program Files\KDiff3;C:\Program Files\Git\cmd;C:\Users\Vitali\AppData\Local\atom\bin;C:\MSYS2\usr\bin\site_perl;C:\MSYS2\usr\bin\vendor_perl;C:\MSYS2\usr\bin\core_perl" x86_64-pc-windows-msvc/test/run-pass\x86stdcall2.stage2-x86_64-pc-windows-msvc.exe
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[run-pass] run-pass/x86stdcall2.rs' panicked at 'explicit panic', D:/Sources/Rust/src/compiletest\runtest.rs:1501
```

P.S. I compiled rust for `x86_64-pc-windows-msvc`.

8 years agotrpl: Fix off-by-one highest memory address
Bastien Dejean [Thu, 17 Sep 2015 16:53:01 +0000 (18:53 +0200)]
trpl: Fix off-by-one highest memory address

8 years agoAuto merge of #28421 - alexcrichton:msvc-rmake, r=alexcrichton
bors [Thu, 17 Sep 2015 16:22:46 +0000 (16:22 +0000)]
Auto merge of #28421 - alexcrichton:msvc-rmake, r=alexcrichton

Work carried over from #27938

8 years agoRemove empty test files
Andrew Paseltiner [Thu, 17 Sep 2015 16:04:34 +0000 (12:04 -0400)]
Remove empty test files

It is likely that these were committed by mistake.

8 years agormake: Get all tests passing on MSVC
Alex Crichton [Wed, 26 Aug 2015 23:57:56 +0000 (16:57 -0700)]
rmake: Get all tests passing on MSVC

8 years agoAuto merge of #28428 - dotdash:same_adjust, r=nikomatsakis
bors [Thu, 17 Sep 2015 14:40:59 +0000 (14:40 +0000)]
Auto merge of #28428 - dotdash:same_adjust, r=nikomatsakis

Currently, we're generating adjustments, for example, to get from &[u8]
to &[u8], which is unneeded and kicks us out of trans_into()
into trans() which means an additional stack slot and copy in the
unoptimized code.

8 years agoAdd tests for #23543, #23544
Andrew Paseltiner [Thu, 17 Sep 2015 13:30:43 +0000 (09:30 -0400)]
Add tests for #23543, #23544

Closes #23543.
Closes #23544.

8 years agoDon't create adjustments from a type to itself
Björn Steinbrink [Tue, 15 Sep 2015 23:26:58 +0000 (01:26 +0200)]
Don't create adjustments from a type to itself

Currently, we're generating adjustments, for example, to get from &[u8]
to &[u8], which is unneeded and kicks us out of trans_into() into
trans() which means an additional stack slot and copy in the unoptimized
code.

8 years agoAuto merge of #28455 - nrc:span-bang, r=alexcrichton
bors [Thu, 17 Sep 2015 12:58:22 +0000 (12:58 +0000)]
Auto merge of #28455 - nrc:span-bang, r=alexcrichton

I can't see how to test this.

Fixes https://github.com/nrc/rustfmt/issues/320

8 years agoAuto merge of #28381 - ebfull:aint-fraid-a-no-ghosts-redux, r=me
bors [Thu, 17 Sep 2015 10:11:23 +0000 (10:11 +0000)]
Auto merge of #28381 - ebfull:aint-fraid-a-no-ghosts-redux, r=me

#27483 redux at Gankro's request.

Fixes #26905, Closes #28239

r? @nrc

8 years agoFix test expectations because of #28439
Simonas Kazlauskas [Thu, 17 Sep 2015 09:47:03 +0000 (12:47 +0300)]
Fix test expectations because of #28439

8 years agoCorrect type definition of HANDLE.
Vitali Haravy [Thu, 17 Sep 2015 09:03:27 +0000 (12:03 +0300)]
Correct type definition of HANDLE.

8 years agoAuto merge of #28454 - GSam:master, r=nrc
bors [Thu, 17 Sep 2015 08:28:33 +0000 (08:28 +0000)]
Auto merge of #28454 - GSam:master, r=nrc

This is so that the resolution results can be used after analysis, potentially for tool support

8 years agoRemove Visibility field from enum variants
Simonas Kazlauskas [Wed, 16 Sep 2015 17:01:15 +0000 (20:01 +0300)]
Remove Visibility field from enum variants

Followup on #28440

8 years agolibsyntax: forbid visibility modifiers for enum variants
Aleksey Kladov [Wed, 16 Sep 2015 16:35:33 +0000 (19:35 +0300)]
libsyntax: forbid visibility modifiers for enum variants

fixes #28433

8 years agoAuto merge of #28438 - apasel422:issue-22872, r=alexcrichton
bors [Thu, 17 Sep 2015 05:44:29 +0000 (05:44 +0000)]
Auto merge of #28438 - apasel422:issue-22872, r=alexcrichton

The original issue was not fixed, but the test passed due to disabled debug assertions.

8 years agoFix the span for ! returns
Nick Cameron [Thu, 17 Sep 2015 03:13:51 +0000 (15:13 +1200)]
Fix the span for ! returns

8 years agoAuto merge of #28349 - nrc:ast-lints, r=manishearth
bors [Thu, 17 Sep 2015 03:05:56 +0000 (03:05 +0000)]
Auto merge of #28349 - nrc:ast-lints, r=manishearth

r? @nikomatsakis, f? @Manishearth

8 years agoAuto merge of #28453 - dinfuehr:patch-4, r=alexcrichton
bors [Thu, 17 Sep 2015 01:24:02 +0000 (01:24 +0000)]
Auto merge of #28453 - dinfuehr:patch-4, r=alexcrichton

8 years agoAdd compiler option to keep mtwt tables
Garming Sam [Thu, 10 Sep 2015 09:47:57 +0000 (21:47 +1200)]
Add compiler option to keep mtwt tables

This is so that the resolution results can be used after analysis, potentially for tool support

8 years agocorrected link to Hasher
Dominik Inführ [Thu, 17 Sep 2015 01:01:46 +0000 (18:01 -0700)]
corrected link to Hasher

8 years agorebasing
Nick Cameron [Tue, 15 Sep 2015 05:31:33 +0000 (17:31 +1200)]
rebasing

8 years agoChange to a multi-trait approach
Nick Cameron [Mon, 14 Sep 2015 23:35:25 +0000 (11:35 +1200)]
Change to a multi-trait approach

[breaking-change] for lint authors

You must now implement LateLintPass or EarlyLintPass as well as LintPass and use either register_late_lint_pass or register_early_lint_pass, rather than register_lint_pass.

8 years agoChanges to tests
Nick Cameron [Fri, 11 Sep 2015 08:15:58 +0000 (20:15 +1200)]
Changes to tests

8 years agoRemove hir::ExprParen
Nick Cameron [Thu, 10 Sep 2015 05:17:08 +0000 (17:17 +1200)]
Remove hir::ExprParen

8 years agoChange the unused parens lint to operate on the AST
Nick Cameron [Thu, 10 Sep 2015 04:49:15 +0000 (16:49 +1200)]
Change the unused parens lint to operate on the AST

8 years agoAdd an early lint pass for lints that operate on the AST
Nick Cameron [Thu, 10 Sep 2015 04:40:59 +0000 (16:40 +1200)]
Add an early lint pass for lints that operate on the AST

There is a minor [breaking-change] for lint authors - some functions which were previously defined on `lint::Context` have moved to a trait - `LintContext`, you may need to import that trait to avoid name resolution errors.

8 years agoChange OSX version req wording to match Linux.
Dongie Agnir [Wed, 16 Sep 2015 22:56:56 +0000 (18:56 -0400)]
Change OSX version req wording to match Linux.

8 years agoAuto merge of #28436 - ranma42:faster-partialord, r=bluss
bors [Wed, 16 Sep 2015 21:45:46 +0000 (21:45 +0000)]
Auto merge of #28436 - ranma42:faster-partialord, r=bluss

This branch improves the performance of Ord and PartialOrd methods for slices compared to the iter-based implementation.
Based on the approach used in #26884.

8 years agoAuto merge of #28432 - aochagavia:docs2, r=alexcrichton
bors [Wed, 16 Sep 2015 19:02:55 +0000 (19:02 +0000)]
Auto merge of #28432 - aochagavia:docs2, r=alexcrichton

Fixes #28431

8 years agoRemove incorrect test for #22872
Andrew Paseltiner [Wed, 16 Sep 2015 15:44:41 +0000 (11:44 -0400)]
Remove incorrect test for #22872

The original issue was not fixed, but the test passed due to disabled
debug assertions.

8 years agoExplain explicit slicing in slice cmp and partial_cmp methods
Andrea Canciani [Wed, 16 Sep 2015 14:09:23 +0000 (16:09 +0200)]
Explain explicit slicing in slice cmp and partial_cmp methods

The explicit slicing is needed in order to enable additional range
check optimizations in the compiler.

8 years agoRemove inline attribute
Andrea Canciani [Wed, 16 Sep 2015 14:09:01 +0000 (16:09 +0200)]
Remove inline attribute

Be more conservative with inlining.

8 years agoRemove boundary checks in slice comparison operators
Andrea Canciani [Wed, 16 Sep 2015 13:27:14 +0000 (15:27 +0200)]
Remove boundary checks in slice comparison operators

In order to get rid of all range checks, the compiler needs to
explicitly see that the slices it iterates over are as long as the
loop variable upper bound.

This further improves the performance of slice comparison:

```
test u8_cmp          ... bench:       4,761 ns/iter (+/- 1,203)
test u8_lt           ... bench:       4,579 ns/iter (+/- 649)
test u8_partial_cmp  ... bench:       4,768 ns/iter (+/- 761)
test u16_cmp         ... bench:       4,607 ns/iter (+/- 580)
test u16_lt          ... bench:       4,681 ns/iter (+/- 567)
test u16_partial_cmp ... bench:       4,607 ns/iter (+/- 967)
test u32_cmp         ... bench:       4,448 ns/iter (+/- 891)
test u32_lt          ... bench:       4,546 ns/iter (+/- 992)
test u32_partial_cmp ... bench:       4,415 ns/iter (+/- 646)
test u64_cmp         ... bench:       4,380 ns/iter (+/- 1,184)
test u64_lt          ... bench:       5,684 ns/iter (+/- 602)
test u64_partial_cmp ... bench:       4,663 ns/iter (+/- 1,158)
```

8 years agoReuse cmp in totally ordered types
Andrea Canciani [Wed, 16 Sep 2015 13:25:51 +0000 (15:25 +0200)]
Reuse cmp in totally ordered types

Instead of manually defining it, `partial_cmp` can simply wrap the
result of `cmp` for totally ordered types.

8 years agoAdd test for #24533
Andrew Paseltiner [Wed, 16 Sep 2015 10:50:24 +0000 (06:50 -0400)]
Add test for #24533

Closes #24533.

8 years agoImprove PartialOrd for slices
Andrea Canciani [Tue, 15 Sep 2015 21:20:18 +0000 (23:20 +0200)]
Improve PartialOrd for slices

Reusing the same idea as in #26884, we can exploit the fact that the
length of slices is known, hence we can use a counted loop instead of
iterators, which means that we only need a single counter, instead of
having to increment and check one pointer for each iterator.

Using the generic implementation of the boolean comparison operators
(`lt`, `le`, `gt`, `ge`) provides further speedup for simple
types. This happens because the loop scans elements checking for
equality and dispatches to element comparison or length comparison
depending on the result of the prefix comparison.

```
test u8_cmp          ... bench:      14,043 ns/iter (+/- 1,732)
test u8_lt           ... bench:      16,156 ns/iter (+/- 1,864)
test u8_partial_cmp  ... bench:      16,250 ns/iter (+/- 2,608)
test u16_cmp         ... bench:      15,764 ns/iter (+/- 1,420)
test u16_lt          ... bench:      19,833 ns/iter (+/- 2,826)
test u16_partial_cmp ... bench:      19,811 ns/iter (+/- 2,240)
test u32_cmp         ... bench:      15,792 ns/iter (+/- 3,409)
test u32_lt          ... bench:      18,577 ns/iter (+/- 2,075)
test u32_partial_cmp ... bench:      18,603 ns/iter (+/- 5,666)
test u64_cmp         ... bench:      16,337 ns/iter (+/- 2,511)
test u64_lt          ... bench:      18,074 ns/iter (+/- 7,914)
test u64_partial_cmp ... bench:      17,909 ns/iter (+/- 1,105)
```

```
test u8_cmp          ... bench:       6,511 ns/iter (+/- 982)
test u8_lt           ... bench:       6,671 ns/iter (+/- 919)
test u8_partial_cmp  ... bench:       7,118 ns/iter (+/- 1,623)
test u16_cmp         ... bench:       6,689 ns/iter (+/- 921)
test u16_lt          ... bench:       6,712 ns/iter (+/- 947)
test u16_partial_cmp ... bench:       6,725 ns/iter (+/- 780)
test u32_cmp         ... bench:       7,704 ns/iter (+/- 1,294)
test u32_lt          ... bench:       7,611 ns/iter (+/- 3,062)
test u32_partial_cmp ... bench:       7,640 ns/iter (+/- 1,149)
test u64_cmp         ... bench:       7,517 ns/iter (+/- 2,164)
test u64_lt          ... bench:       7,579 ns/iter (+/- 1,048)
test u64_partial_cmp ... bench:       7,629 ns/iter (+/- 1,195)
```

8 years agoSpecialize `PartialOrd` for totally ordered primitive types
Andrea Canciani [Tue, 15 Sep 2015 13:11:07 +0000 (15:11 +0200)]
Specialize `PartialOrd` for totally ordered primitive types

Knowing the result of equality comparison can enable additional
optimizations in LLVM.

Additionally, this makes it obvious that `partial_cmp` on totally
ordered types cannot return `None`.

8 years agoAuto merge of #28353 - GuillaumeGomez:error_codes, r=Manishearth
bors [Wed, 16 Sep 2015 08:51:30 +0000 (08:51 +0000)]
Auto merge of #28353 - GuillaumeGomez:error_codes, r=Manishearth

r? @Manishearth

This is a work in progress.

8 years agoSimplify sample code for {Option, Result}::iter_mut
Adolfo Ochagavía [Wed, 16 Sep 2015 08:17:38 +0000 (10:17 +0200)]
Simplify sample code for {Option, Result}::iter_mut

Fixes #28431

8 years agoEnd of adding error codes in librustc
Guillaume Gomez [Mon, 14 Sep 2015 19:25:04 +0000 (21:25 +0200)]
End of adding error codes in librustc

8 years agoAuto merge of #28420 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik
bors [Wed, 16 Sep 2015 05:48:49 +0000 (05:48 +0000)]
Auto merge of #28420 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik

This was pointed out by @filsmick and @swatteau in #28412.

8 years agoAuto merge of #28417 - apasel422:issue-23036, r=arielb1
bors [Wed, 16 Sep 2015 04:07:07 +0000 (04:07 +0000)]
Auto merge of #28417 - apasel422:issue-23036, r=arielb1

Closes #23036.

8 years agoAuto merge of #28401 - christopherdumas:beginners_manuel, r=Gankro
bors [Wed, 16 Sep 2015 02:18:01 +0000 (02:18 +0000)]
Auto merge of #28401 - christopherdumas:beginners_manuel, r=Gankro

r? @steveklabnik

8 years agoAuto merge of #28399 - nrc:attrs, r=nikomatsakis
bors [Wed, 16 Sep 2015 00:35:24 +0000 (00:35 +0000)]
Auto merge of #28399 - nrc:attrs, r=nikomatsakis

This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.

8 years agoUse ast attributes every where (remove HIR attributes).
Nick Cameron [Mon, 14 Sep 2015 09:58:20 +0000 (21:58 +1200)]
Use ast attributes every where (remove HIR attributes).

This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.

8 years agoAuto merge of #28426 - brson:ver, r=alexcrichton
bors [Tue, 15 Sep 2015 22:52:59 +0000 (22:52 +0000)]
Auto merge of #28426 - brson:ver, r=alexcrichton

8 years agoAdd a comment that the `Atomic*` are all implicitly `Send`
Tobias Bucher [Wed, 9 Sep 2015 11:12:25 +0000 (12:12 +0100)]
Add a comment that the `Atomic*` are all implicitly `Send`

8 years agoAuto merge of #28408 - brson:relnotes, r=aturon
bors [Tue, 15 Sep 2015 21:10:16 +0000 (21:10 +0000)]
Auto merge of #28408 - brson:relnotes, r=aturon

I'd love to have any tips about highlights and lang stuff I missed. Sadly, this needs to be merged *tomorrow*.

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md)

8 years agoBump to 1.5
Brian Anderson [Tue, 15 Sep 2015 21:05:10 +0000 (14:05 -0700)]
Bump to 1.5

8 years ago1.3 release notes
Brian Anderson [Wed, 19 Aug 2015 21:16:26 +0000 (14:16 -0700)]
1.3 release notes

8 years agoFixe heading
christopherdumas [Tue, 15 Sep 2015 17:37:52 +0000 (10:37 -0700)]
Fixe heading

8 years agoFix option link and anchor links.
christopherdumas [Tue, 15 Sep 2015 14:54:43 +0000 (07:54 -0700)]
Fix option link and anchor links.

8 years agoAdded anchors for the code snippets.
christopherdumas [Tue, 15 Sep 2015 17:31:48 +0000 (10:31 -0700)]
Added anchors for the code snippets.

8 years agoFix option link and anchor links.
christopherdumas [Tue, 15 Sep 2015 14:54:43 +0000 (07:54 -0700)]
Fix option link and anchor links.

8 years agoAuto merge of #28263 - christopherdumas:add_help_E0118, r=nikomatsakis
bors [Tue, 15 Sep 2015 16:43:41 +0000 (16:43 +0000)]
Auto merge of #28263 - christopherdumas:add_help_E0118, r=nikomatsakis

Contributing to the Rust error explanations. Should I also add a better error for it by default?

8 years agoAuto merge of #28413 - arielb1:deduplication, r=eddyb
bors [Tue, 15 Sep 2015 15:01:05 +0000 (15:01 +0000)]
Auto merge of #28413 - arielb1:deduplication, r=eddyb

clean a few things discovered during my split_ty work

r? @eddyb

8 years agoAdd test for #23036
Andrew Paseltiner [Tue, 15 Sep 2015 14:14:11 +0000 (10:14 -0400)]
Add test for #23036

Closes #23036.

8 years agoAuto merge of #28407 - mmcco:master, r=alexcrichton
bors [Tue, 15 Sep 2015 13:18:13 +0000 (13:18 +0000)]
Auto merge of #28407 - mmcco:master, r=alexcrichton

…e len is actually one more than the length of argv[0]. However, this is precarious and should probably be replaced with more robust logic.

8 years agoAuto merge of #28406 - petrochenkov:primitive, r=eddyb
bors [Tue, 15 Sep 2015 11:35:11 +0000 (11:35 +0000)]
Auto merge of #28406 - petrochenkov:primitive, r=eddyb

This was missing from https://github.com/rust-lang/rust/pull/27451

r? @eddyb

8 years agoAuto merge of #28393 - arielb1:required-because-it-appears, r=nikomatsakis
bors [Tue, 15 Sep 2015 09:52:04 +0000 (09:52 +0000)]
Auto merge of #28393 - arielb1:required-because-it-appears, r=nikomatsakis

new error style:
```
path.rs:4:6: 4:7 error: the trait `core::marker::Sized` is not implemented for the type `[u8]` [E0277]
path.rs:4 fn f(p: Path) {}
               ^
path.rs:4:6: 4:7 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:4:6: 4:7 note: `[u8]` does not have a constant size known at compile-time
path.rs:4:6: 4:7 note: required because it appears within the type `std::sys::os_str::Slice`
path.rs:4:6: 4:7 note: required because it appears within the type `std::ffi::os_str::OsStr`
path.rs:4:6: 4:7 note: required because it appears within the type `std::path::Path`
path.rs:4:6: 4:7 note: all local variables must have a statically known size
path.rs:7:5: 7:36 error: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>` [E0277]
path.rs:7     foo::<BTreeMap<Rc<()>, Rc<()>>>();
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
path.rs:7:5: 7:36 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:7:5: 7:36 note: `alloc::rc::Rc<()>` cannot be sent between threads safely
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::node::Node<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::map::BTreeMap<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required by `foo`
error: aborting due to 2 previous errors
```

Fixes #21793
Fixes #23286

r? @nikomatsakis

8 years agoAuto merge of #28268 - petrochenkov:fnptr, r=alexcrichton
bors [Tue, 15 Sep 2015 08:09:20 +0000 (08:09 +0000)]
Auto merge of #28268 - petrochenkov:fnptr, r=alexcrichton

Closes https://github.com/rust-lang/rust/issues/26082