]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #31074 - gmbonnet:stage0-libdir, r=alexcrichton
bors [Fri, 22 Jan 2016 09:46:17 +0000 (09:46 +0000)]
Auto merge of #31074 - gmbonnet:stage0-libdir, r=alexcrichton

This fixes #27254.

On a 64-bit Linux machine, for example, `configure --libdir=/usr/local/lib64` was creating both `x86_64-unknown-linux-gnu/stage0/lib/rustlib` and `x86_64-unknown-linux-gnu/stage0/lib64/rustlib`. Crates from the stage0 snapshot, like `libcore`, are extracted to `x86_64-unknown-linux-gnu/stage0/lib/rustlib`, but the stage0 compiler was attempting to find them in `x86_64-unknown-linux-gnu/stage0/lib64/rustlib`, which has the highest priority on a 64-bit system.

The issue can be fixed by creating only `x86_64-unknown-linux-gnu/stage0/lib/rustlib`, since this is the only rustlib directory needed for stage0 anyways.

8 years agoAuto merge of #31072 - arielb1:method-callee-cleanup, r=michaelwoerister
bors [Fri, 22 Jan 2016 07:55:13 +0000 (07:55 +0000)]
Auto merge of #31072 - arielb1:method-callee-cleanup, r=michaelwoerister

The old code was terribly ugly and was duplicated in several places.

r? @michaelwoerister

8 years agoAuto merge of #31070 - sfackler:bufreader-box-slice, r=alexcrichton
bors [Fri, 22 Jan 2016 06:04:50 +0000 (06:04 +0000)]
Auto merge of #31070 - sfackler:bufreader-box-slice, r=alexcrichton

Saves a word, and also prevents the impl from accidentally changing the
buffer length.

r? @alexcrichton

8 years agoAuto merge of #31068 - sfackler:bufwriter-panic, r=alexcrichton
bors [Fri, 22 Jan 2016 04:13:26 +0000 (04:13 +0000)]
Auto merge of #31068 - sfackler:bufwriter-panic, r=alexcrichton

We don't want to write the same data twice.

Closes #30888

r? @alexcrichton

8 years agoAuto merge of #31064 - retep998:msvc-host-dlls, r=alexcrichton
bors [Fri, 22 Jan 2016 02:22:54 +0000 (02:22 +0000)]
Auto merge of #31064 - retep998:msvc-host-dlls, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/31063

r? @alexcrichton

8 years agoAuto merge of #30944 - fhahn:issue-29789-use-constant2, r=nagisa
bors [Fri, 22 Jan 2016 00:31:29 +0000 (00:31 +0000)]
Auto merge of #30944 - fhahn:issue-29789-use-constant2, r=nagisa

This PR for  #29789 uses `rustc::repr::mir::Constant` in `ExprKind::Repeat`, which seems to fit quite nicely. Is there a reason for not re-using that type?

8 years agoAuto merge of #30882 - petrochenkov:varnamesp, r=nrc
bors [Thu, 21 Jan 2016 22:41:37 +0000 (22:41 +0000)]
Auto merge of #30882 - petrochenkov:varnamesp, r=nrc

Tuple and unit variants from other crates weren't put into type namespace.
Now variant namespacing is aligned with struct namespacing and is not affected by the variant's crate of origin (struct -> type, tuple/unit -> type/value).
Additionally, struct variants from other crates are put into value namespace (struct variants from local crate were already in it). This is not a necessity, but a future proofing measure.

This fix can result in some new shadowing errors in cross-crate scenarios, crater reports [three regressions](https://github.com/rust-lang/rust/pull/30882#issuecomment-172369883).
[breaking-change]

8 years agoAdd Debug impl and erase region for TypedConstVal
Florian Hahn [Thu, 21 Jan 2016 21:49:26 +0000 (22:49 +0100)]
Add Debug impl and erase region for TypedConstVal

8 years agoIntroduce and use TypedConstVal for Repeat
Florian Hahn [Wed, 20 Jan 2016 22:14:00 +0000 (23:14 +0100)]
Introduce and use TypedConstVal for Repeat

8 years ago[MIR] use mir::repr::Constant in ExprKind::Repeat, close #29789
Florian Hahn [Fri, 15 Jan 2016 21:44:53 +0000 (22:44 +0100)]
[MIR] use mir::repr::Constant in ExprKind::Repeat, close #29789

8 years agoAuto merge of #31052 - bluss:split-at-mut-str, r=alexcrichton
bors [Thu, 21 Jan 2016 20:51:34 +0000 (20:51 +0000)]
Auto merge of #31052 - bluss:split-at-mut-str, r=alexcrichton

Use raw pointers to avoid aliasing in str::split_at_mut

Introduce private function  from_raw_parts_mut for str to factor out the logic.

We want to use raw pointers here instead of duplicating a &mut str, to
be on safer ground w.r.t rust aliasing rules.

This has already been fixed for slices in PR #27358, issue #27357

8 years agoresolve: Fix variant namespacing
Vadim Petrochenkov [Thu, 21 Jan 2016 20:22:01 +0000 (23:22 +0300)]
resolve: Fix variant namespacing

8 years agoadd fixme
Ariel Ben-Yehuda [Thu, 21 Jan 2016 20:07:15 +0000 (22:07 +0200)]
add fixme

8 years agoAuto merge of #31028 - erickt:ast-json, r=michaelwoerister
bors [Thu, 21 Jan 2016 19:01:24 +0000 (19:01 +0000)]
Auto merge of #31028 - erickt:ast-json, r=michaelwoerister

The protocol for `serialize::{En,De}code` doesn't allow for two integers to be serialized next to each other.

Closes #31025.

cc @michaelwoerister

8 years agoAuto merge of #31043 - shahn:arc_weak, r=alexcrichton
bors [Thu, 21 Jan 2016 17:11:13 +0000 (17:11 +0000)]
Auto merge of #31043 - shahn:arc_weak, r=alexcrichton

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2,
b44ee371b8beea77aa1364460acbba14a8516559 and
36ba96ea3cfef575ddc5eea7754a1b70b50e2080.

8 years agoAuto merge of #31024 - oli-obk:move_checks_out_of_librustc, r=arielb1
bors [Thu, 21 Jan 2016 15:21:09 +0000 (15:21 +0000)]
Auto merge of #31024 - oli-obk:move_checks_out_of_librustc, r=arielb1

-    check_const
-    check_static_recursion
-    check_loop
-    check_rvalues

r? @arielb1

8 years agocore: Use raw pointers to avoid aliasing in str::split_at_mut
Ulrik Sverdrup [Wed, 20 Jan 2016 16:18:54 +0000 (17:18 +0100)]
core: Use raw pointers to avoid aliasing in str::split_at_mut

Introduce private function from_raw_parts_mut for str to factor out the logic.

We want to use raw pointers here instead of duplicating a &mut str, to
be on safer ground w.r.t rust aliasing rules.

8 years agoAuto merge of #31057 - bluss:memrchr-fallback, r=alexcrichton
bors [Thu, 21 Jan 2016 13:31:43 +0000 (13:31 +0000)]
Auto merge of #31057 - bluss:memrchr-fallback, r=alexcrichton

Use the fallback impl for memrchr on non-linux

The memrchr code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).

Previous PR #30381

8 years agoclean up trans_static_method_callee and friends
Ariel Ben-Yehuda [Thu, 21 Jan 2016 12:26:35 +0000 (14:26 +0200)]
clean up trans_static_method_callee and friends

8 years agoconfigure: Do not generate two stage0 rustlib dirs when --libdir is set
Guillaume Bonnet [Thu, 21 Jan 2016 12:08:17 +0000 (13:08 +0100)]
configure: Do not generate two stage0 rustlib dirs when --libdir is set

8 years agomove more checks out of librustc
Oliver Schneider [Thu, 21 Jan 2016 09:52:37 +0000 (10:52 +0100)]
move more checks out of librustc

8 years agoAuto merge of #29520 - retep998:staticlib-naming-fiasco, r=alexcrichton
bors [Thu, 21 Jan 2016 09:02:48 +0000 (09:02 +0000)]
Auto merge of #29520 - retep998:staticlib-naming-fiasco, r=alexcrichton

I'm not sure if this was the best way to go about it, but it seems to work.

Fixes https://github.com/rust-lang/rust/issues/29508

r? @alexcrichton

8 years agoAuto merge of #31042 - shahn:weak_annotations, r=alexcrichton
bors [Thu, 21 Jan 2016 07:13:16 +0000 (07:13 +0000)]
Auto merge of #31042 - shahn:weak_annotations, r=alexcrichton

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.

8 years agoUse a Box<[u8]> in BufReader
Steven Fackler [Thu, 21 Jan 2016 06:40:25 +0000 (22:40 -0800)]
Use a Box<[u8]> in BufReader

Saves a word, and also prevents the impl from accidentally changing the
buffer length.

8 years agoDon't flush in BufWriter destructor after a panic in write
Steven Fackler [Thu, 21 Jan 2016 04:32:14 +0000 (20:32 -0800)]
Don't flush in BufWriter destructor after a panic in write

We don't want to write the same data twice.

Closes #30888

8 years agoAuto merge of #31041 - brson:version, r=alexcrichton
bors [Thu, 21 Jan 2016 05:23:27 +0000 (05:23 +0000)]
Auto merge of #31041 - brson:version, r=alexcrichton

8 years agoAuto merge of #31037 - nrc:cached-ids, r=nikomatsakis
bors [Thu, 21 Jan 2016 03:33:30 +0000 (03:33 +0000)]
Auto merge of #31037 - nrc:cached-ids, r=nikomatsakis

Blocks #30884

r? @nikomatsakis

cc @durka

8 years agoAdd host toolchain DLLs to PATH when executing link.exe
Peter Atashian [Thu, 21 Jan 2016 02:01:56 +0000 (21:01 -0500)]
Add host toolchain DLLs to PATH when executing link.exe
Fixes https://github.com/rust-lang/rust/issues/31063

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoAuto merge of #31010 - petrochenkov:def, r=arielb1
bors [Thu, 21 Jan 2016 01:43:18 +0000 (01:43 +0000)]
Auto merge of #31010 - petrochenkov:def, r=arielb1

All structs and their constructors are defined as `DefStruct`.
`DefTy` is splitted into `DefEnum` and `DefTyAlias`.
Ad hoc flag `bool is_structure` is removed from `DefVariant`, it was required in one place in resolve and could be obtained by other means.
Flag `bool is_ctor` is removed from `DefFn`, it wasn't really used for constructors outside of metadata decoding.

Observable effects:
More specific error messages are selected in some cases.
Two name resolution bugs fixed (https://github.com/rust-lang/rust/issues/30992 and FIXME in compile-fail/empty-struct-braces-expr.rs).

Fixes https://github.com/rust-lang/rust/issues/30992
Closes https://github.com/rust-lang/rust/issues/30361

8 years agoAuto merge of #30982 - KiChjang:zst-collections-tests, r=bluss
bors [Wed, 20 Jan 2016 23:53:24 +0000 (23:53 +0000)]
Auto merge of #30982 - KiChjang:zst-collections-tests, r=bluss

Fixes #28518.

8 years agoAuto merge of #30945 - nagisa:mir-optional-block-dest, r=nikomatsakis
bors [Wed, 20 Jan 2016 22:03:33 +0000 (22:03 +0000)]
Auto merge of #30945 - nagisa:mir-optional-block-dest, r=nikomatsakis

As an attempt to make loop body destination be optional, author implemented a pretty self contained
change and deemed it to be (much) uglier than the alternative of just keeping the unit temporary.
Having the temporary created lazily also has a nice property of not figuring in the MIR of
functions which do not use loops of any sort.

r? @nikomatsakis

8 years agoAuto merge of #30985 - alexcrichton:downgrade-jemaloc, r=brson
bors [Wed, 20 Jan 2016 20:14:18 +0000 (20:14 +0000)]
Auto merge of #30985 - alexcrichton:downgrade-jemaloc, r=brson

We've been seeing a lot of timeouts in tests on the bots and investigation ended
pointing to jemalloc/jemalloc#315 as the culprit. Unfortunately it looks like
that doesn't seem to have a fix on the way soon, so let's temporarily downgrade
back to the previous version of jemalloc we were using (where #30434 was the
most recent upgrade)

8 years agoRename Def's variants and don't reexport them
Vadim Petrochenkov [Wed, 20 Jan 2016 19:31:10 +0000 (22:31 +0300)]
Rename Def's variants and don't reexport them

8 years agoFix associated const resolution on structs
Vadim Petrochenkov [Wed, 20 Jan 2016 18:08:50 +0000 (21:08 +0300)]
Fix associated const resolution on structs

8 years agoRefactor definitions of ADTs in rustc::middle::def
Vadim Petrochenkov [Sun, 17 Jan 2016 19:57:54 +0000 (22:57 +0300)]
Refactor definitions of ADTs in rustc::middle::def

8 years agosyntax: Fix encoding and decoding spans
Erick Tryzelaar [Wed, 20 Jan 2016 18:04:31 +0000 (10:04 -0800)]
syntax: Fix encoding and decoding spans

The protocol for `serialize::{En,De}code` doesn't allow for two
integers to be serialized next to each other. This switches the
protocol to serializing `Span`s as a struct. rbml structs don't
have any overhead, so the metadata shouldn't increase in size,
but it allows the json format to be properly generated, albeit
slightly more heavy than when it was just serializing a span as
a u64.

Closes #31025.

s

8 years agoDowngrade bundled jemalloc version
Alex Crichton [Sun, 17 Jan 2016 19:06:39 +0000 (11:06 -0800)]
Downgrade bundled jemalloc version

We've been seeing a lot of timeouts in tests on the bots and investigation ended
pointing to jemalloc/jemalloc#315 as the culprit. Unfortunately it looks like
that doesn't seem to have a fix on the way soon, so let's temporarily downgrade
back to the previous version of jemalloc we were using (where #30434 was the
most recent upgrade)

8 years agoAuto merge of #30872 - pitdicker:expand_open_options, r=alexcrichton
bors [Wed, 20 Jan 2016 17:19:21 +0000 (17:19 +0000)]
Auto merge of #30872 - pitdicker:expand_open_options, r=alexcrichton

Tracking issue: #30014

This implements the RFC and makes a few other changes.
I have added a few extra tests, and made the Windows and
Unix code as similar as possible.

Part of the RFC mentions the unstable OpenOptionsExt trait
on Windows (see #27720). I have added a few extra methods
to future-proof it for CreateFile2.

8 years agostd: Use the fallback impl for memrchr on non-linux
Ulrik Sverdrup [Wed, 20 Jan 2016 16:59:32 +0000 (17:59 +0100)]
std: Use the fallback impl for memrchr on non-linux

This code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).

8 years agoAdd tests for collections to work with ZSTs
Keith Yeung [Sun, 17 Jan 2016 17:26:01 +0000 (12:26 -0500)]
Add tests for collections to work with ZSTs

8 years agoAdd tests for various diverging & converging loops
Simonas Kazlauskas [Tue, 19 Jan 2016 21:35:32 +0000 (23:35 +0200)]
Add tests for various diverging & converging loops

Mostly testing borrowck and typeck behaviour in presence of `loop` expression

8 years agoAuto merge of #31038 - gereeter:btree-panic, r=Gankro
bors [Wed, 20 Jan 2016 08:18:16 +0000 (08:18 +0000)]
Auto merge of #31038 - gereeter:btree-panic, r=Gankro

…ving elements into it.

Fixes #31029.

8 years agoRemove raw pointer from OpenOptions struct
Paul Dicker [Wed, 20 Jan 2016 07:41:20 +0000 (08:41 +0100)]
Remove raw pointer from OpenOptions struct
Otherwise it is not Send and Sync anymore

8 years agoFix incorrect stability annotations for arc::Weak
Sebastian Hahn [Wed, 20 Jan 2016 05:48:11 +0000 (06:48 +0100)]
Fix incorrect stability annotations for arc::Weak

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2,
b44ee371b8beea77aa1364460acbba14a8516559 and
36ba96ea3cfef575ddc5eea7754a1b70b50e2080.

8 years agoFix incorrect stability annotations for Weak
Sebastian Hahn [Wed, 20 Jan 2016 04:52:05 +0000 (05:52 +0100)]
Fix incorrect stability annotations for Weak

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.

8 years agoBump version to 1.8
Brian Anderson [Wed, 20 Jan 2016 03:39:19 +0000 (03:39 +0000)]
Bump version to 1.8

8 years agoAuto merge of #30894 - antrik:debug-mpsc, r=brson
bors [Wed, 20 Jan 2016 03:28:54 +0000 (03:28 +0000)]
Auto merge of #30894 - antrik:debug-mpsc, r=brson

Minimal fix for https://github.com/rust-lang/rust/issues/30563

This covers all the public structs I think; except for Iter and
IntoIter, which I don't know if or how they should be handled.

8 years agoIn BTreeMap's merge function, adjust the length of the node before moving elements...
Jonathan S [Wed, 20 Jan 2016 03:07:36 +0000 (21:07 -0600)]
In BTreeMap's merge function, adjust the length of the node before moving elements into it.

8 years agoFix a bug with caching ids in the HIR lowering with nested lowered nodes
Nick Cameron [Wed, 20 Jan 2016 02:34:52 +0000 (15:34 +1300)]
Fix a bug with caching ids in the HIR lowering with nested lowered nodes

Blocks #30884

8 years agoAuto merge of #30820 - oli-obk:docs/wrapping_ops, r=alexcrichton
bors [Tue, 19 Jan 2016 23:08:25 +0000 (23:08 +0000)]
Auto merge of #30820 - oli-obk:docs/wrapping_ops, r=alexcrichton

r? @steveklabnik

8 years ago[MIR] Reintroduce the unit temporary
Simonas Kazlauskas [Fri, 15 Jan 2016 22:36:32 +0000 (00:36 +0200)]
[MIR] Reintroduce the unit temporary

An attempt to make loop body destination be optional, author implemented a pretty self contained
change and deemed it to be (much) uglier than the alternative of just keeping the unit temporary.
Having the temporary created lazily also has a nice property of not figuring in the MIR of
functions which do not use loops of any sort.

8 years agoAuto merge of #30696 - steveklabnik:gh30655, r=brson
bors [Tue, 19 Jan 2016 17:34:20 +0000 (17:34 +0000)]
Auto merge of #30696 - steveklabnik:gh30655, r=brson

Fixes #30655

8 years agoAuto merge of #31018 - gutworth:doc-loc, r=alexcrichton
bors [Tue, 19 Jan 2016 15:40:22 +0000 (15:40 +0000)]
Auto merge of #31018 - gutworth:doc-loc, r=alexcrichton

8 years agoAuto merge of #30845 - nagisa:mir-extern-calls, r=dotdash
bors [Tue, 19 Jan 2016 13:46:18 +0000 (13:46 +0000)]
Auto merge of #30845 - nagisa:mir-extern-calls, r=dotdash

Supersedes https://github.com/rust-lang/rust/pull/30517
Fixes https://github.com/rust-lang/rust/issues/29575

cc @luqmana
r? @nikomatsakis

8 years ago[MIR] Implement extern call support
Simonas Kazlauskas [Tue, 12 Jan 2016 13:20:18 +0000 (15:20 +0200)]
[MIR] Implement extern call support

8 years agoAuto merge of #31014 - nrc:fmt-term, r=sfackler
bors [Tue, 19 Jan 2016 11:51:58 +0000 (11:51 +0000)]
Auto merge of #31014 - nrc:fmt-term, r=sfackler

8 years agofix the docs and simplify the implementation of unsigned wrapping ops
Oliver Schneider [Tue, 19 Jan 2016 09:47:27 +0000 (10:47 +0100)]
fix the docs and simplify the implementation of unsigned wrapping ops

8 years agoAuto merge of #31015 - nrc:fmt-test, r=sfackler
bors [Tue, 19 Jan 2016 07:59:55 +0000 (07:59 +0000)]
Auto merge of #31015 - nrc:fmt-test, r=sfackler

8 years agofix path to region inference documentation
Benjamin Peterson [Tue, 19 Jan 2016 04:24:13 +0000 (20:24 -0800)]
fix path to region inference documentation

8 years agomanual fixups
Nick Cameron [Tue, 19 Jan 2016 02:01:22 +0000 (15:01 +1300)]
manual fixups

8 years agorustfmt libtest
Nick Cameron [Tue, 19 Jan 2016 01:55:13 +0000 (14:55 +1300)]
rustfmt libtest

8 years agorustfmt libterm
Nick Cameron [Tue, 19 Jan 2016 01:51:22 +0000 (14:51 +1300)]
rustfmt libterm

8 years agoAuto merge of #31013 - nrc:fmt-rbml, r=sfackler
bors [Tue, 19 Jan 2016 01:48:27 +0000 (01:48 +0000)]
Auto merge of #31013 - nrc:fmt-rbml, r=sfackler

8 years agomanual fixups
Nick Cameron [Tue, 19 Jan 2016 01:39:23 +0000 (14:39 +1300)]
manual fixups

8 years agorustfmt librbml
Nick Cameron [Tue, 19 Jan 2016 01:30:48 +0000 (14:30 +1300)]
rustfmt librbml

8 years agoAuto merge of #31006 - Manishearth:rollup, r=Manishearth
bors [Mon, 18 Jan 2016 23:04:55 +0000 (23:04 +0000)]
Auto merge of #31006 - Manishearth:rollup, r=Manishearth

- Successful merges: #30981, #30982, #30986, #30987, #30988, #30990, #30998
- Failed merges:

8 years agoRollup merge of #31008 - barosl:typo, r=bluss
Manish Goregaokar [Mon, 18 Jan 2016 22:38:59 +0000 (04:08 +0530)]
Rollup merge of #31008 - barosl:typo, r=bluss

8 years agoRollup merge of #30998 - apasel422:btree-set-variance, r=Gankro
Manish Goregaokar [Mon, 18 Jan 2016 22:38:59 +0000 (04:08 +0530)]
Rollup merge of #30998 - apasel422:btree-set-variance, r=Gankro

CC #30642

r? @Gankro

8 years agoRollup merge of #30990 - msvbg:msvbg-clang-7x, r=alexcrichton
Manish Goregaokar [Mon, 18 Jan 2016 22:38:59 +0000 (04:08 +0530)]
Rollup merge of #30990 - msvbg:msvbg-clang-7x, r=alexcrichton

I'm using clang 7.2 which works just fine to compile Rust with, but was disallowed.

8 years agoRollup merge of #30988 - bluss:doc-space-t-bound, r=apasel422
Manish Goregaokar [Mon, 18 Jan 2016 22:38:59 +0000 (04:08 +0530)]
Rollup merge of #30988 - bluss:doc-space-t-bound, r=apasel422

Fix spacing style of `T: Bound` in docs

The space between `T` and `Bound` is the typical style used in code and
produced by rustdoc's rendering. Fixed first in Reflect's docs and then
I fixed all occurrences in docs I could find.

8 years agoRollup merge of #30986 - sliz1:book-macro, r=alexcrichton
Manish Goregaokar [Mon, 18 Jan 2016 22:38:58 +0000 (04:08 +0530)]
Rollup merge of #30986 - sliz1:book-macro, r=alexcrichton

Sorry for nitpicking, but I think the example of the expanded macro should be wrapped inside a pair of curly braces to match the macro definition. Also the current example triggers a variable redefinition error.

8 years agoRollup merge of #30981 - boblehest:tmp, r=alexcrichton
Manish Goregaokar [Mon, 18 Jan 2016 22:38:58 +0000 (04:08 +0530)]
Rollup merge of #30981 - boblehest:tmp, r=alexcrichton

Original: #30968 (My first PR was targeting the wrong branch)

8 years agoFix typo
Barosl Lee [Mon, 18 Jan 2016 18:07:27 +0000 (03:07 +0900)]
Fix typo

8 years agoAuto merge of #30987 - antonblanchard:powerpc64_merge3, r=alexcrichton
bors [Mon, 18 Jan 2016 21:11:53 +0000 (21:11 +0000)]
Auto merge of #30987 - antonblanchard:powerpc64_merge3, r=alexcrichton

We currently pass generic as the CPU to LLVM. This results in worse
than required code generation. On little endian, which is only POWER8,
we avoid many POWER4 and newer instructions.

Pass ppc64 and ppc64le instead.

8 years agoAuto merge of #31000 - bluss:efficient-clone-from-slice, r=dotdash
bors [Mon, 18 Jan 2016 18:35:48 +0000 (18:35 +0000)]
Auto merge of #31000 - bluss:efficient-clone-from-slice, r=dotdash

Restore indexed formulation of clone_from_slice

For good codegen here, we need a lock step iteration where the loop
bound is only checked once per iteration; .zip() unfortunately does not
optimize this way.

If we use a counted loop, and make sure that llvm sees that the bounds
check condition is the same as the loop bound condition, the bounds
checks are optimized out. For this reason we need to slice `from`
(apparently) redundantly.

This commit restores the old formulation of clone_from_slice. In this
shape, clone_from_slice will again optimize into calling memcpy where possible
(for example for &[u8] or &[i32]).

8 years agoEnumerate acceptable clang versions
Martin [Mon, 18 Jan 2016 14:57:57 +0000 (15:57 +0100)]
Enumerate acceptable clang versions

8 years agocore: Restore indexed formulation of clone_from_slice
Ulrik Sverdrup [Mon, 18 Jan 2016 13:51:56 +0000 (14:51 +0100)]
core: Restore indexed formulation of clone_from_slice

For good codegen here, we need a lock step iteration where the loop
bound is only checked once per iteration; .zip() unfortunately does not
optimize this way.

If we use a counted loop, and make sure that llvm sees that the bounds
check condition is the same as the loop bound condition, the bounds
checks are optimized out. For this reason we need to slice `from`
(apparently) redundantly.

This commit restores the old formulation of clone_from_slice. In this
shape, clone_from_slice will again optimize into calling memcpy where possible
(for example for &[u8] or &[i32]).

8 years agoAuto merge of #30956 - KiChjang:move-tests-to-libcollectionstest, r=bluss
bors [Mon, 18 Jan 2016 13:28:57 +0000 (13:28 +0000)]
Auto merge of #30956 - KiChjang:move-tests-to-libcollectionstest, r=bluss

Encountered while I was trying to work on #28518. Please let me know whether this is a correct move.

8 years agoMake `btree_set::{IntoIter, Iter, Range}` covariant
Andrew Paseltiner [Mon, 18 Jan 2016 12:36:39 +0000 (07:36 -0500)]
Make `btree_set::{IntoIter, Iter, Range}` covariant

CC #30642

8 years agoAuto merge of #30996 - oli-obk:fix/load_range_assert, r=nagisa
bors [Mon, 18 Jan 2016 10:34:59 +0000 (10:34 +0000)]
Auto merge of #30996 - oli-obk:fix/load_range_assert, r=nagisa

it makes no sense here, accidentally introduced in #30931

r? @dotdash

8 years agorevert using `trans::Disr` in `LoadRangeAssert`
Oliver Schneider [Mon, 18 Jan 2016 10:30:52 +0000 (11:30 +0100)]
revert using `trans::Disr` in `LoadRangeAssert`

it makes no sense here, accidentally introduced in #30931

8 years agoAuto merge of #30953 - KalitaAlexey:17823-get-rid-of-duplicate-error, r=nrc
bors [Mon, 18 Jan 2016 06:29:59 +0000 (06:29 +0000)]
Auto merge of #30953 - KalitaAlexey:17823-get-rid-of-duplicate-error, r=nrc

8 years agosimplify E0308 message for primitive types
kalita.alexey [Sat, 16 Jan 2016 13:07:45 +0000 (17:07 +0400)]
simplify E0308 message for primitive types

8 years agoAllow clang 7.x in configuration
Martin [Mon, 18 Jan 2016 03:44:35 +0000 (04:44 +0100)]
Allow clang 7.x in configuration

I'm using clang 7.2 which works just fine to compile Rust with, but was disallowed.

8 years agoAuto merge of #30980 - gereeter:fix-btree-iter-variance, r=apasel422
bors [Mon, 18 Jan 2016 02:55:09 +0000 (02:55 +0000)]
Auto merge of #30980 - gereeter:fix-btree-iter-variance, r=apasel422

This takes the approach of making `NodeRef` universally covariant.

 Fixes #30979.

8 years agoAuto merge of #30973 - SimonSapin:patch-16, r=alexcrichton
bors [Mon, 18 Jan 2016 00:58:21 +0000 (00:58 +0000)]
Auto merge of #30973 - SimonSapin:patch-16, r=alexcrichton

I don’t understand what the "flow information" of an IPv6 address is, but it looks separate from the scope ID. This was probably a copy/paste error.

8 years agoAuto merge of #30964 - GuillaumeGomez:patch-5, r=Manishearth
bors [Sun, 17 Jan 2016 22:51:11 +0000 (22:51 +0000)]
Auto merge of #30964 - GuillaumeGomez:patch-5, r=Manishearth

r? @Manishearth

8 years agoFix spacing style of `T: Bound` in docs
Ulrik Sverdrup [Sun, 17 Jan 2016 22:36:38 +0000 (23:36 +0100)]
Fix spacing style of `T: Bound` in docs

The space between `T` and `Bound` is the typical style used in code and
produced by rustdoc's rendering. Fixed first in Reflect's docs and then
I fixed all occurrences in docs I could find.

8 years agoFix C macro example
Stephen (Ziyun) Li [Sun, 17 Jan 2016 19:56:23 +0000 (14:56 -0500)]
Fix C macro example

8 years agoFix LLVM default CPU on powerpc64 and powerpc64le
Anton Blanchard [Sun, 17 Jan 2016 12:06:55 +0000 (12:06 +0000)]
Fix LLVM default CPU on powerpc64 and powerpc64le

We currently pass generic as the CPU to LLVM. This results in worse
than required code generation. On little endian, which is only POWER8,
we avoid many POWER4 and newer instructions.

Pass ppc64 and ppc64le instead.

8 years agoExpand the macro in variance-btree-invariant-types.rs to make compiletest recognize...
Jonathan S [Sun, 17 Jan 2016 17:26:11 +0000 (11:26 -0600)]
Expand the macro in variance-btree-invariant-types.rs to make compiletest recognize that it should error

8 years agoAuto merge of #30978 - nikomatsakis:fulfillment-tree-add-fixme, r=aturon
bors [Sun, 17 Jan 2016 16:10:27 +0000 (16:10 +0000)]
Auto merge of #30978 - nikomatsakis:fulfillment-tree-add-fixme, r=aturon

r? @aturon

8 years agoFix and test variance of BTreeMap and its companion structs.
Jonathan S [Sun, 17 Jan 2016 15:47:21 +0000 (09:47 -0600)]
Fix and test variance of BTreeMap and its companion structs.

8 years agoMove zst test from libcollections to src/test
Keith Yeung [Sat, 16 Jan 2016 13:58:51 +0000 (08:58 -0500)]
Move zst test from libcollections to src/test

8 years agoAdd E0507 error explanation
Guillaume Gomez [Sat, 16 Jan 2016 22:07:44 +0000 (23:07 +0100)]
Add E0507 error explanation

8 years agoAuto merge of #30975 - Manishearth:rollup, r=Manishearth
bors [Sun, 17 Jan 2016 12:23:57 +0000 (12:23 +0000)]
Auto merge of #30975 - Manishearth:rollup, r=Manishearth

- Successful merges: #30938, #30940, #30943, #30949, #30952, #30957, #30959
- Failed merges:

8 years agoadd fixme number into code
Niko Matsakis [Sun, 17 Jan 2016 12:15:19 +0000 (07:15 -0500)]
add fixme number into code

8 years agoRollup merge of #30959 - bluss:bench-resolution, r=Gankro
Manish Goregaokar [Sun, 17 Jan 2016 11:55:48 +0000 (17:25 +0530)]
Rollup merge of #30959 - bluss:bench-resolution, r=Gankro

test: Increase resolution of MB/s stat for bench runs close to 1 second

MB/s was based on the number of iterations performed in a second, when
the iteration duration nears 1 second (1e9 ns), the resolution of the
MB/s stat decreases.

8 years agoRollup merge of #30957 - GuillaumeGomez:patch-3, r=apasel422
Manish Goregaokar [Sun, 17 Jan 2016 11:55:48 +0000 (17:25 +0530)]
Rollup merge of #30957 - GuillaumeGomez:patch-3, r=apasel422

r? @Manishearth

8 years agoRollup merge of #30952 - jonastepe:nomicon_vec_zst_code_fix, r=Gankro
Manish Goregaokar [Sun, 17 Jan 2016 11:55:48 +0000 (17:25 +0530)]
Rollup merge of #30952 - jonastepe:nomicon_vec_zst_code_fix, r=Gankro

* Moved semicolon to the right place in the `let` statement in the ZST section.
* Fixed the missing ZST additions for `RawValIter<T>` from this section in the final code section.