Rollup merge of #112867 - compiler-errors:more-impl-source-nits, r=lcnr

More `ImplSource` nits

Even more clean-ups, I'll put this up in parallel with the `select_in_new_trait_solver` PR.

r? ``@lcnr``
This commit is contained in:
Dylan DPC
2023-06-28 18:28:47 +05:30
committed by GitHub
8 changed files with 47 additions and 106 deletions

View File

@@ -248,7 +248,7 @@ pub fn get_vtable_index_of_object_method<'tcx, N>(
) -> Option<usize> {
// Count number of methods preceding the one we are selecting and
// add them to the total offset.
tcx.own_existential_vtable_entries(object.upcast_trait_def_id)
tcx.own_existential_vtable_entries(tcx.parent(method_def_id))
.iter()
.copied()
.position(|def_id| def_id == method_def_id)