Commit Graph

49644 Commits

Author SHA1 Message Date
Steve Klabnik
c94b14ade4 update link to unwind in book 2016-01-22 09:50:43 -05:00
bors
e7ce7b6365 Auto merge of #31077 - nagisa:mir-temp-promotion, r=dotdash
Fixes #31002

r? @nikomatsakis
2016-01-22 11:36:50 +00:00
bors
cd1b845492 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.
2016-01-22 09:46:17 +00:00
bors
b4a2579cf0 Auto merge of #31072 - arielb1:method-callee-cleanup, r=michaelwoerister
The old code was terribly ugly and was duplicated in several places.

r? @michaelwoerister
2016-01-22 07:55:13 +00:00
bors
00ee90f0f0 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
2016-01-22 06:04:50 +00:00
bors
62c8256b9f Auto merge of #31068 - sfackler:bufwriter-panic, r=alexcrichton
We don't want to write the same data twice.

Closes #30888

r? @alexcrichton
2016-01-22 04:13:26 +00:00
bors
5c1d5fcd87 Auto merge of #31064 - retep998:msvc-host-dlls, r=alexcrichton
Fixes https://github.com/rust-lang/rust/issues/31063

r? @alexcrichton
2016-01-22 02:22:54 +00:00
bors
18b851bc52 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?
2016-01-22 00:31:29 +00:00
bors
54475e950c 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]
2016-01-21 22:41:37 +00:00
Florian Hahn
9884ff1dfb Add Debug impl and erase region for TypedConstVal 2016-01-21 22:53:00 +01:00
Florian Hahn
d31027d3bf Introduce and use TypedConstVal for Repeat 2016-01-21 22:47:11 +01:00
Florian Hahn
c78609134c [MIR] use mir::repr::Constant in ExprKind::Repeat, close #29789 2016-01-21 22:46:50 +01:00
bors
46dcffd05b 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
2016-01-21 20:51:34 +00:00
Vadim Petrochenkov
ff6b0aac6a resolve: Fix variant namespacing 2016-01-21 23:22:01 +03:00
Ariel Ben-Yehuda
0a01d0b732 add fixme 2016-01-21 22:07:15 +02:00
bors
9ae76b363c 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
2016-01-21 19:01:24 +00:00
bors
c6ba7fee97 Auto merge of #31043 - shahn:arc_weak, r=alexcrichton
This was accidentally introduced in
7e2ffc7090,
b44ee371b8 and
36ba96ea3c.
2016-01-21 17:11:13 +00:00
Simonas Kazlauskas
e74aa2bdff [MIR] Promote temps to alloca on multi-assignment
Fixes #31002
2016-01-21 19:01:43 +02:00
bors
340e7eb2a7 Auto merge of #31024 - oli-obk:move_checks_out_of_librustc, r=arielb1
-    check_const
-    check_static_recursion
-    check_loop
-    check_rvalues

r? @arielb1
2016-01-21 15:21:09 +00:00
Ulrik Sverdrup
ba9a3bc453 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.
2016-01-21 15:25:49 +01:00
bors
038de0f95e 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
2016-01-21 13:31:43 +00:00
Ariel Ben-Yehuda
29c296f90b clean up trans_static_method_callee and friends 2016-01-21 14:42:09 +02:00
Guillaume Bonnet
6aa86e5cd1 configure: Do not generate two stage0 rustlib dirs when --libdir is set 2016-01-21 13:18:47 +01:00
Oliver Schneider
c124deca7b move more checks out of librustc 2016-01-21 10:52:37 +01:00
bors
34b4e66736 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
2016-01-21 09:02:48 +00:00
bors
d5ec3ab685 Auto merge of #31042 - shahn:weak_annotations, r=alexcrichton
This was accidentally introduced in
7e2ffc7090.
2016-01-21 07:13:16 +00:00
Steven Fackler
b740c557e2 Use a Box<[u8]> in BufReader
Saves a word, and also prevents the impl from accidentally changing the
buffer length.
2016-01-20 22:40:25 -08:00
Steven Fackler
334bee3489 Don't flush in BufWriter destructor after a panic in write
We don't want to write the same data twice.

Closes #30888
2016-01-20 22:30:46 -08:00
bors
670f5b06e4 Auto merge of #31041 - brson:version, r=alexcrichton 2016-01-21 05:23:27 +00:00
bors
4349cdae9c Auto merge of #31037 - nrc:cached-ids, r=nikomatsakis
Blocks #30884

r? @nikomatsakis

cc @durka
2016-01-21 03:33:30 +00:00
Peter Atashian
a65f5acf5c 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>
2016-01-20 21:01:56 -05:00
bors
51108b64ca 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
2016-01-21 01:43:18 +00:00
bors
7dce32e65d Auto merge of #30982 - KiChjang:zst-collections-tests, r=bluss
Fixes #28518.
2016-01-20 23:53:24 +00:00
bors
4bb9d453cf 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
2016-01-20 22:03:33 +00:00
bors
0b77e50b41 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)
2016-01-20 20:14:18 +00:00
Vadim Petrochenkov
2084c2c33a Rename Def's variants and don't reexport them 2016-01-20 22:31:10 +03:00
Vadim Petrochenkov
d6c9aa8901 Fix associated const resolution on structs 2016-01-20 21:50:57 +03:00
Vadim Petrochenkov
ceaaa1bc33 Refactor definitions of ADTs in rustc::middle::def 2016-01-20 21:50:57 +03:00
Erick Tryzelaar
1dc7eb8853 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
2016-01-20 10:04:31 -08:00
Alex Crichton
884de56f71 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)
2016-01-20 09:38:16 -08:00
bors
292af75f8d 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.
2016-01-20 17:19:21 +00:00
Ulrik Sverdrup
078a6231a7 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).
2016-01-20 18:00:34 +01:00
Keith Yeung
aca4e6a89a Add tests for collections to work with ZSTs 2016-01-20 10:52:00 -05:00
Simonas Kazlauskas
8877cca190 Add tests for various diverging & converging loops
Mostly testing borrowck and typeck behaviour in presence of `loop` expression
2016-01-20 13:28:25 +02:00
bors
c4c9628de7 Auto merge of #31038 - gereeter:btree-panic, r=Gankro
…ving elements into it.

Fixes #31029.
2016-01-20 08:18:16 +00:00
Paul Dicker
ae30294771 Remove raw pointer from OpenOptions struct
Otherwise it is not Send and Sync anymore
2016-01-20 08:41:20 +01:00
Sebastian Hahn
327c902342 Fix incorrect stability annotations for arc::Weak
This was accidentally introduced in
7e2ffc7090,
b44ee371b8 and
36ba96ea3c.
2016-01-20 06:59:00 +01:00
Sebastian Hahn
34f17d98ea Fix incorrect stability annotations for Weak
This was accidentally introduced in
7e2ffc7090.
2016-01-20 05:56:28 +01:00
Brian Anderson
e2b5ada771 Bump version to 1.8 2016-01-20 03:39:19 +00:00
bors
7561466948 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.
2016-01-20 03:28:54 +00:00