Delegation: second attempt to improve perf
This commit is contained in:
@@ -242,7 +242,7 @@ pub(crate) fn inherit_sig_for_delegation_item<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
def_id: LocalDefId,
|
||||
) -> &'tcx [Ty<'tcx>] {
|
||||
let sig_id = tcx.hir().delegation_sig_id(def_id);
|
||||
let sig_id = tcx.hir().opt_delegation_sig_id(def_id).unwrap();
|
||||
let caller_sig = tcx.fn_sig(sig_id);
|
||||
if let Err(err) = check_constraints(tcx, def_id, sig_id) {
|
||||
let sig_len = caller_sig.instantiate_identity().skip_binder().inputs().len() + 1;
|
||||
|
||||
Reference in New Issue
Block a user