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

Rollup of 14 pull requests #65454

Merged
merged 41 commits into from
Oct 16, 2019
Merged

Rollup of 14 pull requests #65454

merged 41 commits into from
Oct 16, 2019

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Oct 15, 2019

Successful merges:

Failed merges:

r? @ghost

nikomatsakis and others added 30 commits October 11, 2019 16:59
In particular, we sometimes cannot if there is an earlier error.
add test to for the fix

add descriptive text for the fix

simplified code logics

update descriptive comments

update to cope with the tidyness requirement

merged commit suggestions

Co-Authored-By: varkor <github@varkor.com>

truncated redundant comments

update to cope with tidy-check
Also move {run-fail -> ui}/never_type
This factors out some duplicated code.
This commit removes an `Option` check in `BitIter::next()`, avoids
calling `trailing_zeros()` when it's not necessary, and avoids the need
for `enumerate()`. This gives a tiny (0.2%) instruction count win on a
couple of benchmarks.

The commit also adds some comments, which is good because this iteration
code is moderately complex.
Instead add a disambiguator to the keys used for distinguishing
resolutions.
…r=matthewjasper

Reducing spurious unused lifetime warnings.

Fixes rust-lang#61115, fixes rust-lang#64493.
…=petrochenkov

Remove last uses of gensyms

Underscore bindings now use unique `SyntaxContext`s to avoid collisions. This was the last use of gensyms in the compiler, so this PR also removes them.

closes rust-lang#49300
cc rust-lang#60869

r? @petrochenkov
…eturn-ice, r=cramertj

don't assume we can *always* find a return type hint in async fn

In particular, we sometimes cannot if there is an earlier error.

Fixes rust-lang#65159

r? @cramertj, who reviewed the original PR
Fix suggestion to constrain trait for method to be found

Fix rust-lang#65044.
…-err-codes, r=Mark-Simulacrum

Cleanup librustc mir err codes

Three things are done in this PR:

 * Sort error codes
 * Uncomment an error code long error explanation (they should **never** be commented)
 * Unify explanations
…sper

Optimize `try_expand_impl_trait_type`

A lot of time was being spent expanding some large `impl Future` types in fuchsia. This PR takes the number of types being visited in one expansion from >3 billion to about a thousand, and eliminates the compile time regression in rust-lang#65147 (in fact, compile times are better than they were before).

Thanks to @Mark-Simulacrum for helping identify the issue and to @matthewjasper for suggesting this change.

Fixes rust-lang#65147.
r? @matthewjasper,@nikomatsakis
Try fix incorrect "explicit lifetime name needed"

This pr is trying to fixes rust-lang#65285 .
…-E0574, r=matthewjasper

Add long error explanation for E0574

Part of rust-lang#61137.
…akis

save-analysis: Don't ICE when resolving qualified type paths in struct members

Previously, we failed since we use `qpath_res` via typeck tables - when using those we need to pass in a HirId that's local to the definition path the tables are rooted at (otherwise we risk frame of reference mismatch and an assertion against invalid lookup).

In this case we can't get typeck tables for struct definition because it has no body, however the struct member type node is rooted under the struct definition and so we can't really do anything about it in terms of traversal.

Instead, we try to "nest" the tables as always but change the default behaviour to use empty typeck tables rather than silently trying to use the current ones. This does work as we expect and for prior art, we use the same approach in the [privacy](https://github.com/rust-lang/rust/blob/7bc94cc3c2ccef8b4d393910bb978a6487db1202/src/librustc_privacy/lib.rs#L332-L341) [pass](https://github.com/rust-lang/rust/blob/7bc94cc3c2ccef8b4d393910bb978a6487db1202/src/librustc_privacy/lib.rs#L1007-L1028).

Fixes rust-lang#64659.
Fixes rust-lang#64821.

r? @nikomatsakis (since this changes the default behaviour introduced in rust-lang@d7d3f19)
…drop, r=eddyb

Return `false` from `needs_drop` for all zero-sized arrays.

Resolves rust-lang#65348.

This changes the result of the `needs_drop` query from `true` to `false` for types such as `[Box<i32>; 0]`. I believe this change to be sound because a zero-sized array can never actually hold a value. This is an elegant way of resolving rust-lang#65348 and rust-lang#64945, but obviously it has much broader implications.
…g-docs, r=alexcrichton

Add troubleshooting section to PGO chapter in rustc book.

- Adds a note about using `-pgo-warn-missing-function` in order to spot mistakes in PGO setup.
- Mentions cargo symbol name issue fixed in 1.39.

Nominating for backport.

r? @alexcrichton
…kmdavis

Optimize `BitIter`

A minor speed improvement.
Organize `never_type`  tests

Extracted from rust-lang#65355.
This just moves some tests around to make things better categorized.

r? @varkor
@tmandry
Copy link
Member Author

tmandry commented Oct 15, 2019

@bors r+ p=14 rollup=never

@bors
Copy link
Contributor

bors commented Oct 15, 2019

📌 Commit 3182f73 has been approved by tmandry

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 15, 2019
@bors
Copy link
Contributor

bors commented Oct 15, 2019

⌛ Testing commit 3182f73 with merge f54911c...

bors added a commit that referenced this pull request Oct 15, 2019
Rollup of 14 pull requests

Successful merges:

 - #64603 (Reducing spurious unused lifetime warnings.)
 - #64623 (Remove last uses of gensyms)
 - #65235 (don't assume we can *always* find a return type hint in async fn)
 - #65242 (Fix suggestion to constrain trait for method to be found)
 - #65265 (Cleanup librustc mir err codes)
 - #65293 (Optimize `try_expand_impl_trait_type`)
 - #65307 (Try fix incorrect "explicit lifetime name needed")
 - #65308 (Add long error explanation for E0574)
 - #65353 (save-analysis: Don't ICE when resolving qualified type paths in struct members)
 - #65389 (Return `false` from `needs_drop` for all zero-sized arrays.)
 - #65402 (Add troubleshooting section to PGO chapter in rustc book.)
 - #65425 (Optimize `BitIter`)
 - #65438 (Organize `never_type`  tests)
 - #65444 (Implement AsRef<[T]> for List<T>)

Failed merges:

 - #65390 (Add long error explanation for E0576)

r? @ghost
@tmandry tmandry added the rollup A PR which is a rollup label Oct 15, 2019
@bors
Copy link
Contributor

bors commented Oct 16, 2019

☀️ Test successful - checks-azure
Approved by: tmandry
Pushing f54911c to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.