You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #144704 - compiler-errors:explode-wf, r=lcnr
expand WF obligations when checking method calls
Don't wrap a bunch of signatures in `FnPtr` then check their WF; instead, check the WFness of each input/output separately.
This is useful for the new trait solver, since because we stall on root obligations we end up needing to repeatedly recompute the WFness of possibly very large function signature types if it ends up bottoming out in ambiguity.
This may also give us more chances to hit the WF fast path for certain types like built-ins.
Finally, this just seems conceptually correct to do. There's nothing conceptually that suggests that wrapping the function signature in an fn pointer makes sense at all to do; I'm guessing that it was just convenient so that we didn't have to register WF obligations in a loop, but it doesn't affect the readability of this code at all.
0 commit comments