Commit Graph

81448 Commits

Author SHA1 Message Date
Ralf Jung
4e6aea1a10 uodate reference again to hopefully fix all link issues 2018-07-27 18:40:47 +02:00
bors
43e6e2ef6a Auto merge of #52770 - pietroalbini:bump-bootstrap, r=Mark-Simulacrum
Bump bootstrap compiler

This PR bumps the bootstrap compiler to the latest beta, `beta-2017-07-27`. That should be the latest beta with relevant changes (the only nominated PR at the moment is a docs change).

r? @Mark-Simulacrum
2018-07-27 15:03:33 +00:00
ljedrz
1cca420435 Use slices where a vector is not necessary 2018-07-27 16:50:28 +02:00
Shotaro Yamada
e995a91a31 Better Option handling 2018-07-27 23:26:36 +09:00
Shotaro Yamada
1bc49a9743 Simplify 2018-07-27 23:26:36 +09:00
Shotaro Yamada
4c1cb7534b Unnecessary to_string 2018-07-27 23:26:36 +09:00
Shotaro Yamada
8296699fae Remove unnecessary .collect() 2018-07-27 23:26:36 +09:00
Shotaro Yamada
3525368a56 Use str::repeat 2018-07-27 23:26:36 +09:00
toidiu
130e3ab31b add section in book 2018-07-27 10:18:06 -04:00
Ralf Jung
a171ed2164 revert accidental atty downgrade 2018-07-27 15:10:52 +02:00
bors
b6cbc1e147 Auto merge of #52648 - davidtwco:issue-52533, r=nikomatsakis
[nll] improve the "fully elaborated type" case in region errors

Fixes #52533.

r? @nikomatsakis
2018-07-27 13:01:48 +00:00
ljedrz
7750a0d0a6 Improve readability of serialize.rs 2018-07-27 14:41:31 +02:00
Zakarum
e25c3e2f16 Fix doc comment for 'ptr::copy_to' method 2018-07-27 15:26:57 +03:00
Aleksey Kladov
5f87f78b14
Fix ws 2018-07-27 14:44:20 +03:00
Ralf Jung
c9eef35429 update reference to fix links 2018-07-27 13:38:20 +02:00
David Wood
2e4224a998
Region inference error messages no longer start with 'free region' 2018-07-27 13:14:56 +02:00
bors
6998b369fa Auto merge of #52733 - pnkfelix:issue-51348-make-temp-for-each-candidate-in-arm, r=nikomatsakis
[NLL] make temp for each candidate in `match` arm

In NLL, `ref mut` patterns leverage the two-phase borrow infrastructure to allow the shared borrows within a guard before the "activation" of the mutable borrow when we begin execution of the match arm's body. (There is further discussion of this on PR #50783.)

To accommodate the restrictions we impose on two-phase borrows (namely that there is a one-to-one mapping between each activation and the original initialization), this PR is making separate temps for each candidate pattern. So in an arm like this:
```rust
PatA(_, ref mut ident) |
PatB(ref mut ident) |
PatC(_, _, ref mut ident) |
PatD(ref mut ident) if guard_stuff(ident) => ...
```

instead of 3 temps (two for the guard and one for the arm body), we now have 4 + 2 temps associated with `ident`: one for each candidate plus the actual temp that the guard uses directly, and then the sixth is the temp used in the arm body.

Fix #51348
2018-07-27 11:02:27 +00:00
Aleksey Kladov
922bf1d2ac
Clarify thread::park semantics 2018-07-27 14:01:42 +03:00
David Wood
f44807ae1e
Improved mechanism for naming regions in non-annotated types. 2018-07-27 13:00:56 +02:00
David Wood
b377e7bbfb
Change label from closure to function where appropriate. 2018-07-27 12:48:47 +02:00
Pietro Albini
69e5222686
bump bootstrap compiler to beta-2018-07-27 2018-07-27 12:24:17 +02:00
Ralf Jung
5feedbd9f8 add smoke test for ManuallyDrop 2018-07-27 12:22:26 +02:00
David Wood
055aaaf765
Fixed missing whitespace on some elaborated types. 2018-07-27 12:05:05 +02:00
David Wood
5282d7d060
Update affected tests. 2018-07-27 12:05:01 +02:00
Ralf Jung
3bc59b5205 use slice::align_to 2018-07-27 11:54:38 +02:00
David Wood
d4be95f0ff
Improved fully elaborated type generation to replace '_#2r-style regions. 2018-07-27 11:18:11 +02:00
David Wood
53dda8e915
Added fully elaborated type label for inferred arguments. 2018-07-27 11:18:11 +02:00
David Wood
41ce2e9dd2
Simplified closure handling to need no new cosntraint categories. 2018-07-27 11:18:07 +02:00
ljedrz
57a5a9b054 Prefer to_string() to format!() 2018-07-27 11:11:18 +02:00
bors
b18b9edf00 Auto merge of #52681 - pnkfelix:z-borrowck-migrate, r=nikomatsakis
Add `-Z borrowck=migrate`

This adds `-Z borrowck=migrate`, which represents the way we want to migrate to NLL under Rust versions to come. It also hooks this new mode into `--edition 2018`, which means we're officially turning NLL on in the 2018 edition.

The basic idea of `-Z borrowck=migrate` that there are cases where NLL is fixing old soundness bugs in the borrow-checker, but in order to avoid just breaking code by immediately rejecting the programs that hit those soundness bugs, we instead use the following strategy:

If your code is accepted by NLL, then we accept it.
If your code is rejected by both NLL and the old AST-borrowck, then we reject it.
If your code is rejected by NLL but accepted by the old AST-borrowck, then we emit the new NLL errors as **warnings**.

These warnings will be turned into hard errors in the future, and they say so in these diagnostics.

Fix #46908
2018-07-27 09:10:07 +00:00
Shotaro Yamada
b326e71b79 Incorporate a stray test 2018-07-27 18:07:20 +09:00
Shotaro Yamada
3170956276 Remove unused option flag 2018-07-27 17:42:41 +09:00
Stjepan Glavina
688db1df80 Add stability attributes 2018-07-27 10:08:02 +02:00
bors
7c2aeb9d97 Auto merge of #52650 - oli-obk:associated_existential_types, r=nikomatsakis
Implement associated existential types

r? @nikomatsakis

no idea if these work with generic traits. I'm going home for the day 🤣
2018-07-27 07:16:12 +00:00
Petr Hosek
e950d22fbf Omit the vendor component in Fuchsia triple
Previously, using unknown as the vendor value would lead to the same
result, but with the multiarch runtimes support in Clang, the target is
now used to locate the runtime libraries and so the format is important.
The denormalized format with omitted vendor component is the format we
use with Clang and should be using for Rust as well.
2018-07-26 23:52:00 -07:00
toidiu
3bc6becf8b fix tidy 2018-07-27 00:02:58 -04:00
bors
3d0e93309d Auto merge of #52724 - alexcrichton:update-compiler-builtins, r=alexcrichton
Update the compiler-builtins submodule

Pull in a fix for japaric/libm#129
2018-07-27 03:24:16 +00:00
toidiu
0fd7fee5c6 fix test and add feature gate test 2018-07-26 22:58:03 -04:00
toidiu
429ae93c09 some comment about not infering static lifetimes test 2018-07-26 20:32:01 -04:00
toidiu
44df36567b feature gate for inferring 'static lifetimes 2018-07-26 20:25:27 -04:00
Josh Stone
efa11da26a rustc_metadata: test loading atoi instead of cos
Some platforms don't actually have `libm` already linked in the test
infrastructure, and then `dynamic_lib::tests::test_loading_cosine` would
fail to find the "cos" symbol.  Every platform running this test should
have `libc` and "atoi" though, so try to use that symbol instead.

Fixes #45410.
2018-07-26 17:20:02 -07:00
Stjepan Glavina
89a81625f4 Impl Send & Sync for JoinHandle 2018-07-27 01:08:13 +02:00
bors
419e60ee9d Auto merge of #52673 - oli-obk:mutable_promoted, r=nagisa,cramertj,estebank
Try to fix an ICE

might fix #52671
2018-07-26 22:20:17 +00:00
Alex Crichton
336cf9db5f Tweak the raw_identifiers lints in 2018
* Enable the `raw_identifiers` feature automatically in the 2018 preview
* Only emit lint warnings if the `raw_identifiers` feature is activated

cc rust-lang/cargo#5783
2018-07-26 14:14:10 -07:00
Matthew Jasper
b32caef1ad Use better spans for cannot-move errors 2018-07-26 22:06:12 +01:00
Matthew Jasper
71637c2937 Use better spans for dummy accesses used in matches 2018-07-26 22:06:12 +01:00
Felix S. Klock II
946264526c review feedback: no reason to clone just to make a singleton slice. 2018-07-26 22:48:56 +02:00
QuietMisdreavus
0db4317709 rustdoc: rework how default passes are chosen 2018-07-26 15:33:25 -05:00
Esteban Küber
a3bf27b1db Suggest underscore when using dashes in crate namet push fork 2018-07-26 13:12:42 -07:00
ljedrz
acd38f656a Improve a few vectors - calculate capacity or build from iterators 2018-07-26 21:48:38 +02:00