Commit Graph

96145 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
dec2c8bd16
Rollup merge of #62164 - jsgf:buffer-save-analysis, r=Xanewok
save-analysis: use buffered writes

Otherwise it ends up writing the file byte at a time, which can be very slow for large outputs.

cc @ljw1004
2019-06-27 23:01:17 +02:00
Mazdak Farrokhzad
fdf75af730
Rollup merge of #62160 - ia0:question_mark_macro_sep, r=petrochenkov
Remove outdated question_mark_macro_sep lint
2019-06-27 23:01:15 +02:00
Mazdak Farrokhzad
766795fe5a
Rollup merge of #62156 - ehuss:update-books, r=ehuss
Update books

Update nomicon, reference, book, rust-by-example, rustc-guide

## nomicon

2 commits in c656171b749b7307f21371dd0d3278efee5573b8..341c221116a8b9f1010cf1eece952b80c5ec7f54
2019-04-25 15:31:26 -0400 to 2019-06-19 09:08:47 -0700
- Fix some links.
- cleanup the intro, and clarify how it relates to the reference (rust-lang-nursery/nomicon#140)

## reference

2 commits in 08ae27a4921ca53967656a7391c82f6c0ddd1ccc..7a5aab5fd50d6290679beb4cf42fa5f46ed22aec
2019-06-17 11:24:13 -0700 to 2019-06-20 17:38:52 +0200
- Update for cfg on generic parameter. (rust-lang-nursery/reference#624)
- Link to "const functions" section from constant expressions list (rust-lang-nursery/reference#623)

## book

2 commits in 9aacfcc4c5b102c8cda195932addefd32fe955d2..6c0d83499c8e77e06a71d28c5e1adccec278d4f3
2019-06-16 21:27:26 -0400 to 2019-06-23 20:25:30 -0400
- fancy quotes
- Edits made in copyedit

## rust-by-example

2 commits in b27472962986e85c94f4183b1a6d2207660d3ed6..62b3ff2cb44dd8b648c3ef2a9347c3706d148014
2019-06-17 15:52:07 -0300 to 2019-06-24 09:17:21 -0300
- A couple of fixes for the `Box, stack and heap` chapter. (rust-lang/rust-by-example#1206)
- [typo] Note, that it is -> Note that, it is (rust-lang/rust-by-example#1207)

## rustc-guide

38 commits in f55e97c145cf37fd664db2e0e2f2d05df328bf4f..abf512fc9cc969dcbea69aa15b44586bbeb13c2d
2019-06-15 17:29:12 -0500 to 2019-06-26 11:05:58 -0500
- fix long line
- add `point` to the glossary and link a use of it
- fix indentation
- Update src/borrow_check/region_inference/placeholders_and_universes.md
- Update src/borrow_check/region_inference/placeholders_and_universes.md
- Update src/borrow_check/region_inference/placeholders_and_universes.md
- Update src/borrow_check/region_inference/member_constraints.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/member_constraints.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/member_constraints.md
- Update src/borrow_check/region_inference/member_constraints.md
- Update src/borrow_check/region_inference/lifetime_parameters.md
- Update src/borrow_check/region_inference/member_constraints.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- Update src/borrow_check/region_inference/lifetime_parameters.md
- Update src/borrow_check/region_inference/lifetime_parameters.md
- Update src/borrow_check/region_inference/lifetime_parameters.md
- Update src/borrow_check/region_inference/constraint_propagation.md
- adjust overview slightly
- describe region inference and member constraints in some detail
- start filling out the constraint propagation chapter in more detail
- break out parts of the region inference chapter into sub-chapters
- fix typo
- avoid ftp links
- fix broken links
- add bibligraphy appendix
- Update to mdbook-linkcheck 0.3.0
- Update mdbook
- Change stage0 cfg_attr to bootstrap
- fix compiler-team
- Added Rustc Debugger Support Chapter
2019-06-27 23:01:14 +02:00
Mazdak Farrokhzad
a1a0e0c945
Rollup merge of #62155 - cramertj:61872, r=centril
Add regression test for MIR drop generation in async loops

Fixes #61986.

r? @Centril
2019-06-27 23:01:13 +02:00
Mazdak Farrokhzad
0fe028eae0
Rollup merge of #62154 - mark-i-m:old-fixme, r=Centril
Remove old fixme

fixed in https://github.com/rust-lang/rust/pull/60160

r? @Centril
2019-06-27 23:01:11 +02:00
Mazdak Farrokhzad
274c3de168
Rollup merge of #62152 - doctorn:async_let_ice, r=cramertj
Don't ICE on item in `.await` expression

The code for lowering a `.await` expression missed that item IDs may already have been assigned for items inside of an `async` block, or for closures. This change means we no longer exit early after finding a `.await` in a block that isn't `async` and instead just emit the error. This avoids an ICE generated due to item IDs not being densely generated. (The `YieldSource` of the generated `yield` expression is  used to avoid errors generated about having `yield` expressions outside of generator literals.)

r? @cramertj

Resolves #62009 and resolves #61685
2019-06-27 23:01:10 +02:00
Mazdak Farrokhzad
4aa3e27231
Rollup merge of #62131 - Xanewok:clip-some-nits, r=petrochenkov
libsyntax: Fix some Clippy warnings

When I was working on it before a lot of these popped up in the RLS so I figured I'll send a small patch fixing only the (hopefully) uncontroversial ones.

Others that could be also fixed included also [`clippy::print_with_newline`](https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline) and [`clippy::cast_lossless`](https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless). Should I add them as well?

since most of it touches libsyntax...
r? @petrochenkov
2019-06-27 23:01:09 +02:00
Mazdak Farrokhzad
bc335d6c16
Rollup merge of #62124 - matklad:without-with, r=petrochenkov
refactor lexer to use idiomatic borrowing
2019-06-27 23:01:07 +02:00
Mazdak Farrokhzad
e8f398623e
Rollup merge of #62106 - cramertj:test-await, r=centril
Add more tests for async/await

I'll follow up with more of these, but here's an initial few.

r? @Centril
2019-06-27 23:01:06 +02:00
Mazdak Farrokhzad
36b26e9bac
Rollup merge of #62102 - RalfJung:read, r=Centril
call out explicitly that general read needs to be called with an initialized buffer
2019-06-27 23:01:04 +02:00
Mazdak Farrokhzad
1c7d311fdc
Rollup merge of #62076 - XAMPPRocky:master, r=XAMPPRocky
Updated RELEASES.md for 1.36.0

[Rendered](https://github.com/XAMPPRocky/rust/blob/master/RELEASES.md)

r? @Mark-Simulacrum

cc @rust-lang/release
2019-06-27 23:01:03 +02:00
Mazdak Farrokhzad
df97fc6038
Rollup merge of #62067 - doctorn:await_diagnostic, r=matthewjasper
Add suggestion for missing `.await` keyword

This commit adds a suggestion diagnostic for missing `.await`. In order to do this, the trait `Future` is promoted to a lang item.

Compiling code of the form:

```rust
#![feature(async_await)]

fn take_u32(x: u32) {}

async fn make_u32() -> u32 {
    22
}

async fn foo() {
    let x = make_u32();
    take_u32(x)
}

fn main() {}
```

Will now result in the suggestion:

```
error[E0308]: mismatched types
  --> src/main.rs:11:18
   |
11 |         take_u32(x)
   |                  ^
   |                  |
   |                  expected u32, found opaque type
   |                  help: consider using `.await` here: `x.await`
   |
   = note: expected type `u32`
              found type `impl std::future::Future`
```

This commit does not cover chained expressions and therefore only covers the case originally pointed out in #61076. Cases I can think of that still need to be covered:

- [ ] Return places for functions
- [ ] Field access
- [ ] Method invocation

I'm planning to submit PRs for each of these separately as and when I have figured them out.
2019-06-27 23:01:01 +02:00
Mazdak Farrokhzad
2f6cf36b32
Rollup merge of #62043 - Centril:remove-fnbox, r=cramertj
Remove `FnBox`

Remove `FnBox` since we now have `Box<dyn FnOnce>`.

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

r? @cramertj
2019-06-27 23:01:00 +02:00
Mazdak Farrokhzad
7ddfae74b1
Rollup merge of #61878 - RalfJung:pin, r=Dylan-DPC
improve pinning projection docs

This tries to improve the explanation of structural pinning and pinning projections based on [this URLO thread](https://users.rust-lang.org/t/when-is-it-safe-to-move-a-member-value-out-of-a-pinned-future/28182).

Fixes https://github.com/rust-lang/rust/issues/61272.
2019-06-27 23:00:58 +02:00
Dylan MacKenzie
e2479e263e Use more efficient iteration order for backward dataflow
This applies the same basic principle as #62062 to the reverse dataflow
analysis used to compute liveness information. It is functionally
equivalent, except that post-order is used instead of reverse post-order.

Some `mir::Body`s contain basic blocks which are not reachable from the
`START_BLOCK`. We need to add them to the work queue as well to preserve
the original semantics.
2019-06-27 11:40:35 -07:00
Dylan MacKenzie
07c5e2b310 Use a more efficient iteration order for forward dataflow
Currently, dataflow begins by visiting each block in order of ID
(`BasicBlock(0)`, `BasicBlock(1)`, etc.). This PR changes that initial
iteration to reverse post-order. This ensures that the effects of all
predecessors will be applied before a basic block is visited if the CFG
has no back-edges, and should result in less total iterations even when
back-edges exist. This should not change the results of dataflow
analysis.

The current ordering for basic blocks is pretty close to RPO
already--`BasicBlock(0)` is already the start block, so the gains from
this are pretty small, especially since we need to do an extra traversal
up front.

Note that some basic blocks are unreachable from the `START_BLOCK`
during dataflow. We add these blocks to the work queue as well to
preserve the original behavior.
2019-06-27 11:38:52 -07:00
Alex Crichton
2a375827ab std: Move a process test out of libstd
This commit moves a test out of libstd which is causing deadlocks on
musl on CI. Looks like the recent update in musl versions brings in some
internal updates to musl which makes `setgid` and `setuid` invalid to
call after a `fork` in a multithreaded program. The issue seen here is
that the child thread was attempting to grab a lock held by a
nonexistent thread, meaning that the child process simply deadlocked
causing the whole test to deadlock.

This commit moves the test to its own file with no threads which should
work.
2019-06-27 07:54:53 -07:00
bors
8ebd67e4ee Auto merge of #62136 - lzutao:clippy-up, r=oli-obk
submodules: Update clippy from 8c80b65f to e3cb40e4

r? @Manishearth
2019-06-27 14:30:33 +00:00
CrLF0710
8339211809 Added comment description. 2019-06-27 20:59:17 +08:00
Nathan Corbyn
88194200e5 Add suggestion for missing .await keyword 2019-06-27 13:56:55 +01:00
Igor Matuszewski
d79104bda1 Update RLS 2019-06-27 13:41:00 +02:00
Ralf Jung
fc918a395a rename InterpretCx -> InterpCx
That's more consistent with InterpResult and InterpError.
2019-06-27 13:23:34 +02:00
Alex Crichton
b6087492ed rustc: Retry SIGILL linker invocations
We've seen quite a few issues with spurious illegal instructions getting
executed on OSX on CI recently. For whatever reason `cc` itself is
executing an illegal instruction and we're not really getting any other
information about what's happening. Since we're already retrying the
linker when it segfaults, let's just continue to retry everything and
automatically reinvoke the linker when it fails with an illegal instruction.
2019-06-27 02:23:06 -07:00
bors
a6b5d229c1 Auto merge of #62147 - Centril:rollup-pigazoz, r=alexcrichton
[CI] Rollup of 5 pull requests

Successful merges:

 - #62140 (ci: Turn off PR builds on Travis)
 - #62141 (ci: Disable assertions in PR builds)
 - #62142 (ci: Switch official `try` builds to happen on Azure)
 - #62143 (ci: Publish toolstate changes from Azure)
 - #62145 (ci: Sync AppVeyor/Travis with Azure configuration)

Failed merges:

r? @ghost
2019-06-27 08:15:27 +00:00
Andy Russell
e991abd004
remove unused derives and variants 2019-06-26 21:15:13 -04:00
Jeremy Fitzhardinge
768d500157 save-analysis: use buffered writes
Otherwise it ends up writing the file byte at a time, which can be very slow for large outputs.
2019-06-26 17:22:39 -07:00
Christian Poveda
e1e95a8386 Use force_bits when casting from a pointer 2019-06-26 18:50:20 -05:00
Josh Stone
b533aff927 Use pointer::write_bytes for android sigemptyset 2019-06-26 16:27:54 -07:00
Josh Stone
3ba1f39fe7 Avoid mem::uninitialized() in std::sys::unix
For `libc` types that will be initialized in FFI calls, we can just use
`MaybeUninit` and then pass around raw pointers.

For `sun_path_offset()`, which really wants `offset_of`, all callers
have a real `sockaddr_un` available, so we can use that reference.
2019-06-26 15:03:15 -07:00
Yuki Okushi
742e851aaa Update miri 2019-06-27 04:45:12 +09:00
Julien Cretin
e053eede87 Remove outdated question_mark_macro_sep lint 2019-06-26 20:34:12 +02:00
Alex Crichton
6772ebc274 ci: Disable x86_64-msvc-tools builder
While we figure out what's wrong let's continue to land PRs
2019-06-26 11:13:08 -07:00
Eric Huss
7e62050b23 Update books 2019-06-26 10:57:00 -07:00
Taylor Cramer
72ca844ca7 Add regression test for MIR drop generation in async loops
Fixes #61986.
2019-06-26 10:40:06 -07:00
Mark Mansi
182ce772ef remove old fixme 2019-06-26 11:21:59 -05:00
Nathan Corbyn
5cb841d72e Don't ICE on item in .await expression 2019-06-26 15:49:10 +01:00
Alex Crichton
16b37b5027 Update linked OpenSSL version
This bumps our linked OpenSSL version from 1.1.1a to 1.1.1c, picking up
some various bug fixes and minor security issue fixes.
2019-06-26 05:39:07 -07:00
Mazdak Farrokhzad
93077f3f39 Hash force_pass_mode when config.mode == Pretty. 2019-06-26 14:32:23 +02:00
Igor Matuszewski
ad62b4203c Fix clippy::precedence 2019-06-26 14:14:27 +02:00
Igor Matuszewski
1af1f6277e Fix clippy::print_with_newline 2019-06-26 14:11:58 +02:00
Igor Matuszewski
33f58baf6e Fix clippy::redundant_closure 2019-06-26 14:11:58 +02:00
Igor Matuszewski
6c93b47c01 Fix clippy::cast_losless 2019-06-26 14:11:58 +02:00
Igor Matuszewski
12806b7050 Fix clippy::redundant_field_names 2019-06-26 13:59:58 +02:00
John Kåre Alsaker
8465daf982 Check for local types in writeback with debug assertions 2019-06-26 13:04:06 +02:00
John Kåre Alsaker
c9325181d6 Don't use lift to detect local types 2019-06-26 13:04:05 +02:00
Mazdak Farrokhzad
cd93888351
Rollup merge of #62145 - alexcrichton:sync-azure, r=pietroalbini
ci: Sync AppVeyor/Travis with Azure configuration

Manually make sure that we do the same thing across all the services,
uncovering one spot where we needed to pass one more configure flag on
Azure but otherwise we're good to go!
2019-06-26 11:33:46 +02:00
Mazdak Farrokhzad
7acf40029b
Rollup merge of #62143 - alexcrichton:toolstate, r=pietroalbini
ci: Publish toolstate changes from Azure

This commit moves toolstate publishing from Travis to Azure. We've been
testing on azure for some time now and this works by deleting the Travis
config and updating the credentials used on Azure.
2019-06-26 11:33:44 +02:00
Mazdak Farrokhzad
c09cf0f5f0
Rollup merge of #62142 - alexcrichton:azure-try, r=pietroalbini
ci: Switch official `try` builds to happen on Azure

This commit switches the `try` builers to officially happen on Azure
Pipelines instead of Travis where they're currently run. This also cuts
back the number of builders to just the two we run on Travis, leaving
expansion as a possible future extension.
2019-06-26 11:33:43 +02:00
Mazdak Farrokhzad
00efd13439
Rollup merge of #62141 - alexcrichton:less-assertions, r=pietroalbini
ci: Disable assertions in PR builds

The PR builder on Azure currently takes 2.5h which is a bit long, so
this commit disables debug assertions and llvm assertions in an attempt
to speed up that builder and have PR builds come back a bit more
quickly. Other builders continue to enable debug assertions and test the
compiler there.
2019-06-26 11:33:42 +02:00
Mazdak Farrokhzad
b863efbfa1
Rollup merge of #62140 - alexcrichton:less-pr-builds, r=pietroalbini
ci: Turn off PR builds on Travis

This commit turns off PR builds happening on Travis, instead entirely
relying on Azure for PR builds to succeed.
2019-06-26 11:33:41 +02:00