Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync to rust-lang/rust master #26

Merged
merged 97 commits into from
Sep 23, 2019
Merged

Sync to rust-lang/rust master #26

merged 97 commits into from
Sep 23, 2019

Conversation

BaoshanPang
Copy link

wchargin and others added 30 commits September 8, 2019 14:12
Summary:
Invoking `rev` does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use `echo` rather
than `rev`, which probably explains the source of the discrepancy.

Also, a `mut` qualifier is unused.

Test Plan:
Copy the code block into <https://play.rust-lang.org> with a `fn main`
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an `unused_mut` warning and then panic.

wchargin-branch: stdio-piped-docs
This avoids concurrency-related bugs when locks are acquired for too
short a time and similar cases.
That's way more than is needed, and winds up recording types
that will never appear in MIR.
Should probably check how this performs, but it's always nicer to
track just a bit less mutable state.
Currently, after a CALL terminator is created in MIR, we insert DROP
statements for all of its operands -- even though they were just moved
shortly before! These spurious drops are later removed, but not before
causing borrow check errors.

This PR series modifies the drop code to track operands that were
moved and avoid creating drops for them.

Right now, I'm only using this mechanism for calls, but it seems
likely it could be used in more places.
The Windows dist builders are the slowest builders right now, and the
distribution phase of them is enormously slow clocking in at around 20
minutes to build all the related installers. This commit starts to
optimize these by turning down the compression level in the `exe`
installers. These aren't super heavily used so there's no great need for
them to be so ultra-compressed, so let's dial back the compression
parameters to get closer to the rest of our xz archives. This brings the
installer in line with the gz tarball installer locally, and also brings
the compression settings on par with the rest of our xz installers.
This is the same as #64615 except applied to our MSI installers. The
same fix is applied effectively bringing these installers in line with
the gz tarball installers, which are about 3x faster to produce locally
and likely much faster to produce on CI.
* Pass `/Q` to `iscc` on Windows to supress the thousands of lines of
  output about compressing documentation.
* Print out what's happening before long steps
* Use `timeit` to print out timing information for long-running
  installer assemblies.
…es, r=eddyb

record fewer adjustment types in generator witnesses, avoid spurious drops in MIR construction

Don't record all intermediate adjustment types -- That's way more than is needed, and winds up recording types that will never appear in MIR.

Note: I'm like 90% sure that this logic is correct, but this stuff is subtle and can be hard to keep straight.  However, the risk of this PR is fairly low -- if we miss types here, I believe the most common outcome is an ICE.

This fixes the original issue cited by #64477, but I'm leaving the issue open for now since there may be other cases we can detect and improve in a targeted way.

r? @Zoxc
This would follow the same coding style as all the other match arms in this file.
estebank and others added 28 commits September 21, 2019 18:57
Rollup of 9 pull requests

Successful merges:

 - #63907 (Add explanation to type mismatch involving type params and assoc types)
 - #64615 (rustbuild: Turn down compression on exe installers)
 - #64617 (rustbuild: Turn down compression on msi installers)
 - #64618 (rustbuild: Improve output of `dist` step)
 - #64619 (Fixes #63962. Hint about missing tuple parentheses in patterns)
 - #64634 (Update to LLVM 9.0.0)
 - #64635 (Allow using fn pointers in const fn with unleash miri)
 - #64660 (unify errors for tuple/struct variants)
 - #64664 (fully remove AstBuilder)

Failed merges:

r? @ghost
also removed some duplicated logic from TypeRelation methods.
Use span label instead of note in unreachable lint

Fix #64636.
On obligation errors point at the unfulfilled binding when possible

CC #42855, #64130, #64135. Fix #61860.
Fix `Stdio::piped` example code and lint

Summary:
Invoking `rev` does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use `echo` rather
than `rev`, which probably explains the source of the discrepancy.

Also, a `mut` qualifier is unused.

Test Plan:
Copy the code block into <https://play.rust-lang.org> with a `fn main`
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an `unused_mut` warning and then panic.

wchargin-branch: stdio-piped-docs
…henkov

Cleanup syntax::ext::build

I suspect most of this code could be inlined but I only removed the bits where the inlining didn't really hurt readability (i.e., method call -> function call) or the completely unused code.
Propagate `types.err` in locals further to avoid spurious knock-down errors

Fix #33575, fix #44504.
…ochenkov

Parse assoc type bounds in generic params and provide custom diagnostic

Fix #26271.
Infer consts more consistently

Moved some duplicated logic in `TypeRelation` methods into `super_combined_consts`. Before some `TypeRelation`s like `Lub` wasn't using `replace_if_possible`, meaning some inference types were staying around longer than they should be.

Fixes #64519

r? @varkor
Rollup of 7 pull requests

Successful merges:

 - #64294 (Fix `Stdio::piped` example code and lint)
 - #64670 (Cleanup syntax::ext::build)
 - #64674 (Propagate `types.err` in locals further to avoid spurious knock-down errors)
 - #64676 (Parse assoc type bounds in generic params and provide custom diagnostic)
 - #64677 (remove outdated comment)
 - #64679 (Infer consts more consistently)
 - #64688 (Clarify the "since" tidy check)

Failed merges:

r? @ghost
Refactor librustc_errors::Handler API

This should be reviewed by-commit.

The last commit moves all fields into an inner struct behind a single lock; this is done to prevent possible deadlocks in a multi-threaded compiler, as well as inconsistent state observation.
@n-salim n-salim merged commit cd88dae into Wind-River:master Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.