Uh oh!
There was an error while loading. Please reload this page.
Beta 20170928 - #44908
Conversation
This is a partial revert of rust-lang#42588. There is a usability concern reported in rust-lang#44294 that was not considered in the discussion of the PR, so I would like to back this out of 1.21. As is, I think users would have a worse and more confusing experience with this lint enabled by default. We can re-enabled once there are better diagnostics or the case in rust-lang#44294 does not trigger the lint.
This boolean field on the error `Handler` is toggled to silence warnings when `-A warnings` is passed. (This is actually a separate mechanism from the global lint level—whether there's some redundancy to be factored away here is an important question, but not one we concern ourselves with in this commit.) But the same rationale applies for `--cap-lints allow`. In particular, this makes the "soft" feature-gate warning introduced in 8492ad2 (which is not a lint, but just calls `struct_span_warn`) not pollute the builds of dependent crates. Thanks to @kennytm for pointing out the potential of `can_emit_warnings` for this purpose. Resolvesrust-lang#44213.
Brings in a few fixes for wasm/asmjs
After a projection was processed, its derived subobligations no longer need any processing when encountered, and can be removed. This improves the status of rust-lang#43787. This is actually complementary to rust-lang#43938 - that PR fixes selection caching (and @remram44's example, which "accidentally" worked because of the buggy projection caching) while this PR fixes projection caching
Keep **all** the obligations for every projection is wasteful of memory and compilation time. We only really care about those subobligations that may inform the result of the projection (i.e., may help to resolve any inference variables that appear within). Therefore, we can clear the subobligations from the cache that don't potentially affect the result of the projection. On every cache hit, we also take the opportunity to check if the type variables have been resolved *yet* and, if so, clear out the pending obligations. Fixesrust-lang#43613
rust-highfive
commented
Sep 28, 2017
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
nikomatsakis
commented
Sep 28, 2017
alexcrichton
commented
Sep 28, 2017
This may or may not fail due to weird build errors with the libc submodule. If it doesn't, then yay! If it does then this may need to backport #44765. (I'm not sure if this was fast-forwarded enough to require that). Let's wait and see! As one final point can you update the versoin in Other than that, r=me @bors: p=1 |
nikomatsakis
commented
Sep 28, 2017
@alexcrichton is that last commit what you had in mind? |
nikomatsakis
commented
Sep 28, 2017
if not, edit it yourself :) |
alexcrichton
commented
Sep 28, 2017
@bors: r+ Indeed! |
bors
commented
Sep 28, 2017
📌 Commit 41d7051 has been approved by |
bors
commented
Sep 28, 2017
Beta 20170928 Backports of: - Allow unused extern crate again #44825 - macros: fix bug in collecting trait and impl items with derives. #44757 - `--cap-lints allow` switches off `can_emit_warnings` #44627 - Update the libc submodule #44116 - limit and clear cache obligations opportunistically #44269 - clear out projection subobligations after they are processed #43999
bors
commented
Sep 28, 2017
💔 Test failed - status-travis |
kennytm
commented
Sep 29, 2017
Legit. |
arielb1
commented
Oct 5, 2017
Looks like #43132 somehow came back - this was supposed to be fixed by the trait-system PRs, so I guess a backport made them come back. IncidentThis is not good. The release is pretty soon, and I'm on vacation Sunday to Tuesday. Next time we have problems with backports like this, we should ping more people and earlier cc @rust-lang/infra (and the new triage group). I'll try to get a fix to our backport troubles over the weekend, but that's not something that should have happened. |
We want to retain obligations that *contain* inference variables, not obligations that *don't contain* them, in order to fixrust-lang#43132. Because of surrounding changes to inference, the ICE doesn't occur in its original case, but I believe it could still be made to occur on master. Maybe I should try to write a new test case? Certainly not right now (I'm mainly trying to get us a beta that we can ship) but maybe before we land this PR on nightly? This seems to cause a 10% performance regression in my imprecise attempt to benchmark item-body checking for rust-lang#43613, but it's better to be slow and right than fast and wrong. If we want to recover that, I think we can change the constrained-type-parameter code to actually give a list of projections that are important for resolving inference variables and filter everything else out.
…lity lint" This reverts commit 80cf3f9.
nikomatsakis
commented
Oct 6, 2017
alexcrichton
commented
Oct 6, 2017
@bors: r+ p=100 |
bors
commented
Oct 6, 2017
📌 Commit 2eabf4f has been approved by |
bors
commented
Oct 6, 2017
⌛ Testing commit 2eabf4f with merge cc40fd3fea939b73490d1f81f5193d2353e48e40... |
bors
commented
Oct 6, 2017
💔 Test failed - status-travis |
libc trouble on sparc: |
alexcrichton
commented
Oct 6, 2017
Working on it |
alexcrichton
commented
Oct 6, 2017
@bors: r+ |
bors
commented
Oct 6, 2017
📌 Commit a32ac51 has been approved by |
alexcrichton
commented
Oct 6, 2017
@bors: r+ |
bors
commented
Oct 6, 2017
📌 Commit 9042ebf has been approved by |
bors
commented
Oct 6, 2017
⌛ Testing commit 9042ebf with merge 235b06f77a1df71ce90ee3d23c1d83bca77e1e5f... |
bors
commented
Oct 7, 2017
💔 Test failed - status-travis |
kennytm
commented
Oct 7, 2017
@bors retry
|
bors
commented
Oct 7, 2017
⌛ Testing commit 9042ebf with merge 6393327735f0826056b0990292e2b1cea24a5b9b... |
bors
commented
Oct 7, 2017
💔 Test failed - status-travis |
kennytm
commented
Oct 7, 2017
Failed to cross-compile Do we need #44612? |
I believe everything was renamed anyway, so beta is broken regardless
alexcrichton
commented
Oct 7, 2017
@bors: r+ Removed the fuchsia builder, I believe it's broken anyway on beta |
bors
commented
Oct 7, 2017
📌 Commit a4923d9 has been approved by |
bors
commented
Oct 7, 2017
Beta 20170928 Backports of: - Allow unused extern crate again #44825 - macros: fix bug in collecting trait and impl items with derives. #44757 - `--cap-lints allow` switches off `can_emit_warnings` #44627 - Update the libc submodule #44116 - limit and clear cache obligations opportunistically #44269 - clear out projection subobligations after they are processed #43999 - fix logic error in #44269's `prune_cache_value_obligations` #45065 - REVERTS #43543: Cleanup some remains of `hr_lifetime_in_assoc_type` compatibility lint:
bors
commented
Oct 7, 2017
☀️ Test successful - status-appveyor, status-travis |
Backports of:
--cap-lints allowswitches offcan_emit_warnings--cap-lints allowswitches offcan_emit_warnings#44627prune_cache_value_obligationsfix logic error in #44269'sprune_cache_value_obligations#45065hr_lifetime_in_assoc_typecompatibility lint #43543: Cleanup some remains ofhr_lifetime_in_assoc_typecompatibility lint: