Small refactor

This commit is contained in:
Cameron Steffen 2021-04-19 15:40:05 -05:00
parent 98a11e01e5
commit c9c14d0c1f

View File

@ -439,8 +439,7 @@ fn virtual_call_violation_for_method<'tcx>(
return Some(MethodViolationCode::WhereClauseReferencesSelf);
}
let receiver_ty =
tcx.liberate_late_bound_regions(method.def_id, sig.map_bound(|sig| sig.inputs()[0]));
let receiver_ty = tcx.liberate_late_bound_regions(method.def_id, sig.input(0));
// Until `unsized_locals` is fully implemented, `self: Self` can't be dispatched on.
// However, this is already considered object-safe. We allow it as a special case here.