Uh oh!
There was an error while loading. Please reload this page.
Fix Instance::resolve() incorrectly returning specialized instances - #67662
Conversation
9cb8cb7 to
d88a745CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8525d2d to
4cfd5c4CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
anp
commented
Dec 27, 2019
@oli-obk I assume that closing #67631 implies this should also fix the test failure I have in #67137, but rebasing onto @wesleywiser's branch still yields a failure for me :(. |
We only want to return specializations when `Reveal::All` is passed, not when `Reveal::UserFacing` is. Resolving this fixes several issues with the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization passes. Fixesrust-lang#66901
4cfd5c4 to
25a8b5dComparewesleywiser
commented
Dec 27, 2019
Force pushed |
wesleywiser
commented
Dec 27, 2019
Hi @anp do you have the error details so I can look at them? |
anp
commented
Dec 27, 2019
It's the same error that highfive reports: |
oli-obk
commented
Dec 27, 2019
I guess we still need my PR for backwards compatibility of @anp's PR. I'll reopen |
wesleywiser
commented
Dec 27, 2019
I have no idea why your PR would change that test's behavior but I wonder if we shouldn't have |
anp
commented
Dec 27, 2019
I think oli said at one point that it would be a breaking change to allow const prop to surface this error? |
oli-obk
commented
Dec 27, 2019
this is the problem, the use of the broken constant inside a never used function should not cause a hard error. |
oli-obk
commented
Dec 27, 2019
@bors r+ |
bors
commented
Dec 27, 2019
📌 Commit 25a8b5d has been approved by |
| let eligible = if !resolved_item.defaultness.is_default() { | ||
| true | ||
| } else if param_env.reveal == traits::Reveal::All { | ||
| !trait_ref.needs_subst() |
There was a problem hiding this comment.
You might want an assert that !trait_ref.needs_infer().
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use Reveal::All in MIR optimizations Resolves some code review feedback in rust-lang#67662. Fixesrust-lang#68855 r? @eddyb
Use Reveal::All in MIR optimizations Resolves some code review feedback in rust-lang#67662. Fixesrust-lang#68855 r? @eddyb
Use Reveal::All in MIR optimizations Resolves some code review feedback in rust-lang#67662. Fixesrust-lang#68855 r? @eddyb
We only want to return specializations when
Reveal::Allis passed, notwhen
Reveal::UserFacingis. Resolving this fixes several issues withthe
ConstProp,SimplifyBranches, andInlineMIR optimizationpasses.
Fixes#66901
Rebased on top of #67631
r? @oli-obk