Uh oh!
There was an error while loading. Please reload this page.
Dont check stability for items that are not pub to universe. - #38689
Conversation
rust-highfive
commented
Dec 29, 2016
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
pnkfelix
commented
Dec 29, 2016
Oops I left out a regression test. (And it might be good to try to generalize the specific test to some other scenarios.... will do this in about two hours after i get through some meetings.) |
pnkfelix
commented
Dec 30, 2016
(weird, I guess I must have something subtly wrong with my check. Thank goodness for test suites.) |
nikomatsakis
commented
Dec 30, 2016
Marking as beta-accepted. Small patch, regression. cc @rust-lang/compiler |
There was a problem hiding this comment.
I was hoping this could be used to skip the "missing annotation" error in the original crate, within this same file, ensuring that the logic is self-consistent.
There was a problem hiding this comment.
I'm not sure I follow.
The check you are referring to is fn check_missing_stability, right?
Is there an example you can show me of input code that is currently emitting a "missing annotation" error that you believe should be skipped via this check?
arielb1
commented
Dec 30, 2016
test? |
Includes special case handling for trait methods. Fixrust-lang#38412.
751cd72 to
ab8e925Comparepnkfelix
commented
Jan 3, 2017
@arielb1 okay has good test now! :) |
pnkfelix
commented
Jan 3, 2017
Note that if there's a way to do this without special-casing trait methods (which is what the But I figured this was the simplest fix for the short term that we could backport. Separately we might consider revising what |
petrochenkov
commented
Jan 3, 2017
Strictly speaking the fix is incorrect because stability annotations are based on reachability and not local |
petrochenkov
commented
Jan 3, 2017
Alternatively, the ICE can just be removed, since it's no longer an error to encounter unmarked API 😄 |
pnkfelix
commented
Jan 3, 2017
(I lean slightly towards landing this over removing the ICE, in terms of what seems safest to push into the beta. But I don't have a real strong feeling about it. If other members of T-compiler think removing the ICE is the way to go, then we can try that.) |
pnkfelix
commented
Jan 3, 2017
@petrochenkov also, just to clarify: Your point about this fix being technically incorrect is because it is imposing too strong a constraint on the code, right? I ask because I'm having a little trouble envisaging the scenario where something would have stability attributes and not be locally declared |
nikomatsakis
commented
Jan 3, 2017
I'm fine with landing this PR for now, but I'm not really following closely. |
petrochenkov
commented
Jan 3, 2017
On the contrary, the constraints are not strong enough. still should give and ICE with this patch because |
arielb1
commented
Jan 3, 2017
Sure enough, ignoring the absence of stability markers, at least for items whose resolution was an error, looks like a good idea. |
pnkfelix
commented
Jan 4, 2017
@petrochenkov ah thank you for the example input. |
nikomatsakis
commented
Jan 4, 2017
@pnkfelix do you then plan to revise the PR? |
alexcrichton
commented
Jan 4, 2017
@bors: p=1 (for when this is approved, we'll want to backport) |
pnkfelix
commented
Jan 5, 2017
@bors r=petrochenkov |
nikomatsakis
commented
Jan 5, 2017
Discussed in @rust-lang/compiler meeting. Consensus was to land this PR for the beta, since it seems less risky, but follow-up with @petrochenkov's example afterwards (probably removing the ICE). @petrochenkov, maybe you can file an issue with your example? @bors r+ |
bors
commented
Jan 5, 2017
📌 Commit ab8e925 has been approved by |
bors
commented
Jan 5, 2017
📌 Commit ab8e925 has been approved by |
pnkfelix
commented
Jan 5, 2017
(the answer to @nikomatsakis 's Q above is that I did and do not plan to revise this particular PR. However I will open an issue to make sure that we address the fact that there remains an ICE, just a much rarer one, even with this PR applied, as noted by @petrochenkov ) |
bors
commented
Jan 5, 2017
…, r=nikomatsakis Dont check stability for items that are not pub to universe. Dont check stability for items that are not pub to universe. In other words, skip it for private and even `pub(restricted)` items, because stability checks are only relevant to things visible in other crates. Fix#38412.
bors
commented
Jan 6, 2017
☀️ Test successful - status-appveyor, status-travis |
alexcrichton
commented
Jan 6, 2017
@pnkfelix this applies cleanly to beta but results in a build failure, could you take a look at backporting this to the beta branch? |
…to_privacy, r=compiler-errors stability: remove skip_stability_check_due_to_privacy This was added in rust-lang#38689 to deal with rust-lang#38412. However, even after removing the check, the relevant tests still pass. Let's see if CI finds any other tests that rely on this. If not, it seems like logic elsewhere in the compiler changed so this is not required any more.
…to_privacy, r=compiler-errors stability: remove skip_stability_check_due_to_privacy This was added in rust-lang#38689 to deal with rust-lang#38412. However, even after removing the check, the relevant tests still pass. Let's see if CI finds any other tests that rely on this. If not, it seems like logic elsewhere in the compiler changed so this is not required any more.
Rollup merge of rust-lang#133157 - RalfJung:skip_stability_check_due_to_privacy, r=compiler-errors stability: remove skip_stability_check_due_to_privacy This was added in rust-lang#38689 to deal with rust-lang#38412. However, even after removing the check, the relevant tests still pass. Let's see if CI finds any other tests that rely on this. If not, it seems like logic elsewhere in the compiler changed so this is not required any more.
Dont check stability for items that are not pub to universe.
In other words, skip it for private and even
pub(restricted)items, because stability checks are only relevant to things visible in other crates.Fix#38412.