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

[beta] Rollup backports #56077

Closed
wants to merge 10 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Nov 19, 2018

Merged and approved:

r? @ghost

davidtwco and others added 9 commits November 19, 2018 21:10
This commit adds logging statements to `promote_consts` and
`qualify_consts` to make it easier to understand what it is doing.
This commit adds a test that ensures that a cast in a static doesn't
stop const promotion within the static.
This commit refactors `PlaceContext` to split it into four different
smaller enums based on if the context represents a mutating use,
non-mutating use, maybe-mutating use or a non-use (this is based on the
recommendation from @oli-obk on Zulip[1]).

This commit then introduces a `PlaceContext::AscribeUserTy` variant.
`StatementKind::AscribeUserTy` is now correctly mapped to
`PlaceContext::AscribeUserTy` instead of `PlaceContext::Validate`.
`PlaceContext::AscribeUserTy` can also now be correctly categorized as a
non-use which fixes an issue with constant promotion in statics after a
cast introduces a `AscribeUserTy` statement.

[1]: https://rust-lang.zulipchat.com/#narrow/stream/122657-wg-nll/subject/.2355288.20cast.20fails.20to.20promote.20to.20'static/near/136536949
@pietroalbini
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Nov 19, 2018

📌 Commit 4541827 has been approved by pietroalbini

@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 Nov 19, 2018
@alexcrichton alexcrichton added this to the Rust 2018 Release milestone Nov 19, 2018
@pietroalbini
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 19, 2018
Previously this threshold when testing was 100ns, but the Windows
documentation states:

> which is a high resolution (<1us) time stamp

which presumably means that we could have up to 1us resolution, which
means that 100ns doesn't capture "equivalent" time intervals due to
various bits of rounding here and there.

It's hoped that this..

Closes rust-lang#56034
@pietroalbini
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Nov 19, 2018

📌 Commit 1d1213f has been approved by pietroalbini

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 19, 2018
@bors
Copy link
Contributor

bors commented Nov 19, 2018

⌛ Testing commit 1d1213f with merge ac8413a2bcbab9ad90b3e41c5a281de216de9a74...

@bors
Copy link
Contributor

bors commented Nov 20, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 20, 2018
@kennytm
Copy link
Member

kennytm commented Nov 20, 2018

Needs to backport a clippy update.

[00:57:55] error[E0050]: method `check_pat` has 3 parameters but the declaration in trait `rustc::lint::EarlyLintPass::check_pat` has 4
[00:57:55]    --> tools\clippy\clippy_lints\src\misc_early.rs:219:57
[00:57:55]     |
[00:57:55] 219 |     fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &Pat) {
[00:57:55]     |                                                         ^^^^ expected 4 parameters, found 3
[00:57:55]     |
[00:57:55]     = note: `check_pat` from trait: `fn(&mut Self, &rustc::lint::EarlyContext<'_>, &syntax::ast::Pat, &mut bool)`
[00:57:55] 
[00:57:55] error: aborting due to previous error

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 20, 2018
@nikomatsakis
Copy link
Contributor

I rebased #56102 atop this PR

@nikomatsakis nikomatsakis mentioned this pull request Nov 20, 2018
20 tasks
@pietroalbini pietroalbini deleted the beta-rollup branch November 20, 2018 21:22
bors added a commit that referenced this pull request Nov 20, 2018
beta backport rollup

Backports of some beta-approved PRs

- [x] #55385: NLL: cast causes failure to promote to static
- [x] #56043: remove "approx env bounds" if we already know from trait
- [x] #56003: do not propagate inferred bounds on trait objects if they involve `Self`
- [x] #55852: Rewrite `...` as `..=` as a `MachineApplicable` 2018 idiom lint
- [x] #55804: rustdoc: don't inline `pub use some_crate` unless directly asked to
- [x] #56059: Increase `Duration` approximate equal threshold to 1us
- [x]  Keep resolved defs in path prefixes and emit them in save-analysis #54145
- [x]  Adjust Ids of path segments in visibility modifiers #55487
- [x]  save-analysis: bug fix and optimisation. #55521
- [x]   save-analysis: be even more aggressive about ignorning macro-generated defs #55936
- [x]  save-analysis: fallback to using path id #56060
- [x]  save-analysis: Don't panic for macro-generated use globs #55879
- [x]  Add temporary renames to manifests for rustfmt/clippy #56081
- [x] Revert #51601 #56049
- [x]  Fix stability hole with `static _` #55983
- [x] #56077
- [x] Fix Rustdoc ICE when checking blanket impls #55258
- [x]  Updated RELEASES.md for 1.31.0 #55678
- [x] ~~#56061~~ #56111
- [x]  Stabilize `extern_crate_item_prelude` #56032

Still running tests locally, and I plan to backport @nrc's other PRs too

(cc @petrochenkov -- thanks for the advice)
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants