-
Notifications
You must be signed in to change notification settings - Fork 13.6k
expand WF obligations when checking method calls #144704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
expand WF obligations when checking method calls
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (732256d): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.9%, secondary -2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 469.342s -> 468.025s (-0.28%) |
r? lcnr |
The only major perf regression here is match-stress which seems somewhat unrelated and might just be noise (#144699 (comment)). |
While these changes here are neutral to positive and I agree using an It seems to indicate that we're leaving a lot of perf on the table by not returning the stalled edit: and diagnostics :3 @bors r+ |
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.