Rollup merge of #124918 - nnethercote:FIXME-lcnr, r=lcnr
Eliminate some `FIXME(lcnr)` comments In some cases this involved changing code. In some cases the comment was able to removed or replaced. r? ``@lcnr``
This commit is contained in:
commit
7e4f6082ce
8 changed files with 12 additions and 51 deletions
|
@ -3443,8 +3443,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
self.dcx().try_steal_replace_and_emit_err(self.tcx.def_span(def_id), StashKey::Cycle, err)
|
||||
}
|
||||
|
||||
// FIXME(@lcnr): This function could be changed to trait `TraitRef` directly
|
||||
// instead of using a `Binder`.
|
||||
fn report_signature_mismatch_error(
|
||||
&self,
|
||||
obligation: &PredicateObligation<'tcx>,
|
||||
|
|
|
@ -693,7 +693,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
|
||||
let vtable_base = vtable_trait_first_method_offset(
|
||||
tcx,
|
||||
(unnormalized_upcast_trait_ref, ty::Binder::dummy(object_trait_ref)),
|
||||
unnormalized_upcast_trait_ref,
|
||||
ty::Binder::dummy(object_trait_ref),
|
||||
);
|
||||
|
||||
Ok(ImplSource::Builtin(BuiltinImplSource::Object { vtable_base: vtable_base }, nested))
|
||||
|
|
|
@ -320,16 +320,11 @@ fn vtable_entries<'tcx>(
|
|||
}
|
||||
|
||||
/// Find slot base for trait methods within vtable entries of another trait
|
||||
// FIXME(@lcnr): This isn't a query, so why does it take a tuple as its argument.
|
||||
pub(super) fn vtable_trait_first_method_offset<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
key: (
|
||||
ty::PolyTraitRef<'tcx>, // trait_to_be_found
|
||||
ty::PolyTraitRef<'tcx>, // trait_owning_vtable
|
||||
),
|
||||
trait_to_be_found: ty::PolyTraitRef<'tcx>,
|
||||
trait_owning_vtable: ty::PolyTraitRef<'tcx>,
|
||||
) -> usize {
|
||||
let (trait_to_be_found, trait_owning_vtable) = key;
|
||||
|
||||
// #90177
|
||||
let trait_to_be_found_erased = tcx.erase_regions(trait_to_be_found);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue