Uh oh!
There was an error while loading. Please reload this page.
select: treat ErrorCandidate as a real error - #29954
Conversation
sanxiyn
commented
Nov 23, 2015
Travis failures seem real. |
Otherwise, projection can result in type errors that are unified into the trait inputs. We should probably refactor the `normalize_to_error` mess.
the problem is that now "type_is_known_to_be_sized" now returns false when called on a type with ty_err inside - this prevents spurious errors (we may want to move the check to check::cast anyway - see rust-lang#12894).
b7bed52 to
fd0bd39Comparearielb1
commented
Nov 25, 2015
fixed test failures. |
nikomatsakis
commented
Nov 25, 2015
Hmm, I'm not sure about this change. I feel like this will potentially create more downstream fallout. Is it possible that the right fix to #29857 is just to change OTOH maybe it's ok to have trait selection fail and we just suppress the output of failed trait selection (which I know we attempt to do anyway). |
arielb1
commented
Nov 26, 2015
The problem is that |
arielb1
commented
Nov 26, 2015
However, I feel like putting a |
nikomatsakis
commented
Dec 14, 2015
Sorry for the delay. Maybe my head just isn't in the right space anymore, but can you elaborate on this:
It still seems to me that converting an |
nikomatsakis
commented
Dec 18, 2015
OK, so, given that this is a stable -> beta regression, we've got to reach some decision here. I still kind of feel like this is the wrong approach, and the right approach would be to tolerate errors in the coherence code (which feels like what we normally do -- consider errors a success). But it'd be helpful @arielb1 if you could elaborate on what you meant about "false positives" and so forth. |
arielb1
commented
Dec 20, 2015
I should really be reading my e-mails more often. The root cause of the problem here is |
nikomatsakis
commented
Dec 22, 2015
No worries, me too. :)
So I think what you are saying here is that, but for |
arielb1
commented
Dec 22, 2015
Right. The |
nikomatsakis
commented
Dec 31, 2015
@arielb1 while on vacation I was pondering this, and I was wondering if perhaps ignoring errors in coherence (as I have been suggesting) could lead to incorrect code being accepted? Still, it's not obvious to me how this could happen, I'd expect that such an error would be reported during the WF phase. Anyway, it's clear we have to land SOME patch here. I am going to briefly experiment with a patch that is more accepting of type-error today, then we can make a final decision. |
arielb1
commented
Dec 31, 2015
Ignoring errors in coherence should typically actually lead to less code being accepted, but this is still wrong. |
This is an alternative to #29954 for fixing #29857 that seems to me to be more inline with the general strategy around `TyError`. It also includes the fix for #30589 -- in fact, just the minimal change of making `ty_is_local` tolerate `TyError` avoids the ICE, but you get a lot of duplicate error reports, so in the case where the impl's trait reference already includes `TyError`, we just ignore the impl altogether. cc @arielb1@sanxiynFixes#29857. Fixes#30589.
bors
commented
Jan 11, 2016
☔ The latest upstream changes (presumably #30676) made this pull request unmergeable. Please resolve the merge conflicts. |
Otherwise, projection can result in type errors that are unified
into the trait inputs. We should probably refactor the
normalize_to_errormess.We could instead change
ctp::identify_constrained_type_paramsto put a projection's desugar selection before the projection. Would you like that better?Fixes#29857.
r? @nikomatsakis