1
Fork 0

fixup new usages of fn_sig, bound_fn_sig after rebasing

This commit is contained in:
Kyle Matsuda 2023-01-26 20:33:27 -07:00
parent 4a7d0e9754
commit dc1216bc06
4 changed files with 8 additions and 7 deletions

View file

@ -463,7 +463,7 @@ fn foo(&tcx) -> Self::T { String::new() }
ty::AssocKind::Fn == item.kind && Some(item.name) != current_method_ident
})
.filter_map(|item| {
let method = tcx.fn_sig(item.def_id);
let method = tcx.fn_sig(item.def_id).subst_identity();
match *method.output().skip_binder().kind() {
ty::Alias(ty::Projection, ty::AliasTy { def_id: item_def_id, .. })
if item_def_id == proj_ty_item_def_id =>

View file

@ -369,7 +369,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
(ty::FnPtr(sig), ty::FnDef(did, substs)) => {
let expected_sig = &(self.normalize_fn_sig)(*sig);
let found_sig =
&(self.normalize_fn_sig)(self.tcx.bound_fn_sig(*did).subst(self.tcx, substs));
&(self.normalize_fn_sig)(self.tcx.fn_sig(*did).subst(self.tcx, substs));
let fn_name = self.tcx.def_path_str_with_substs(*did, substs);
@ -408,9 +408,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
}
(ty::FnDef(did1, substs1), ty::FnDef(did2, substs2)) => {
let expected_sig =
&(self.normalize_fn_sig)(self.tcx.bound_fn_sig(*did1).subst(self.tcx, substs1));
&(self.normalize_fn_sig)(self.tcx.fn_sig(*did1).subst(self.tcx, substs1));
let found_sig =
&(self.normalize_fn_sig)(self.tcx.bound_fn_sig(*did2).subst(self.tcx, substs2));
&(self.normalize_fn_sig)(self.tcx.fn_sig(*did2).subst(self.tcx, substs2));
if self.same_type_modulo_infer(*expected_sig, *found_sig) {
diag.note("different fn items have unique types, even if their signatures are the same");
@ -440,7 +440,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
}
(ty::FnDef(did, substs), ty::FnPtr(sig)) => {
let expected_sig =
&(self.normalize_fn_sig)(self.tcx.bound_fn_sig(*did).subst(self.tcx, substs));
&(self.normalize_fn_sig)(self.tcx.fn_sig(*did).subst(self.tcx, substs));
let found_sig = &(self.normalize_fn_sig)(*sig);
if !self.same_type_modulo_infer(*found_sig, *expected_sig) {