fix rebase
This commit is contained in:
parent
b0d7ccb133
commit
ac56b06b44
3 changed files with 7 additions and 2 deletions
|
@ -2117,7 +2117,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
// Only assoc fns that return `Self`
|
// Only assoc fns that return `Self`
|
||||||
let fn_sig = self.tcx.fn_sig(item.def_id).skip_binder();
|
let fn_sig = self.tcx.fn_sig(item.def_id).skip_binder();
|
||||||
let ret_ty = fn_sig.output();
|
let ret_ty = fn_sig.output();
|
||||||
let ret_ty = self.tcx.erase_late_bound_regions(ret_ty);
|
let ret_ty =
|
||||||
|
self.tcx.normalize_erasing_late_bound_regions(self.param_env, ret_ty);
|
||||||
if !self.can_eq(self.param_env, ret_ty, adt_ty) {
|
if !self.can_eq(self.param_env, ret_ty, adt_ty) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2002,6 +2002,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
self.tcx.get_diagnostic_item(sym::BorrowMut),
|
self.tcx.get_diagnostic_item(sym::BorrowMut),
|
||||||
];
|
];
|
||||||
let mut candidate_fields: Vec<_> = fields
|
let mut candidate_fields: Vec<_> = fields
|
||||||
|
.into_iter()
|
||||||
.filter_map(|candidate_field| {
|
.filter_map(|candidate_field| {
|
||||||
self.check_for_nested_field_satisfying(
|
self.check_for_nested_field_satisfying(
|
||||||
span,
|
span,
|
||||||
|
|
|
@ -1749,7 +1749,10 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
|
||||||
// Only assoc fns that return `Self`
|
// Only assoc fns that return `Self`
|
||||||
let fn_sig = self.r.tcx.fn_sig(item.def_id).skip_binder();
|
let fn_sig = self.r.tcx.fn_sig(item.def_id).skip_binder();
|
||||||
let ret_ty = fn_sig.output();
|
let ret_ty = fn_sig.output();
|
||||||
let ret_ty = self.r.tcx.erase_late_bound_regions(ret_ty);
|
let ret_ty = self
|
||||||
|
.r
|
||||||
|
.tcx
|
||||||
|
.normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), ret_ty);
|
||||||
let ty::Adt(def, _args) = ret_ty.kind() else {
|
let ty::Adt(def, _args) = ret_ty.kind() else {
|
||||||
return None;
|
return None;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue