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
{{ message }}
Repository navigation
Commit 5510b38
Browse filesBrowse the repository at this point in the historyBrowse files
Rollup merge of #165863 - nnethercote:avoid-instantiating-FnSig, r=bjorn3
Avoid instantiating `FnSig` when not necessary
In various places we call `fn_sig`, which is expensive because it instantiates the signature, but then only look at the ABI or the safety, which don't require the instantiation. This commit introduces `fn_sig_abi` and `fn_sig_safety` which are alternatives that skip instantiation.
In `check_instance_abi` the commit also changes `instance.ty(...)` to `tcx.type_of(...)` to avoid a second unnecessary instantiation path.
r? @bjorn3
0 commit comments