Skip to content

Commit c772728

Browse files
committed
Resolve conflict
1 parent be46b44 commit c772728

File tree

1 file changed

+6
-1
lines changed
  • compiler/rustc_typeck/src/check/fn_ctxt

1 file changed

+6
-1
lines changed

Diff for: compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_hir::{ExprKind, GenericArg, Node, QPath};
1616
use rustc_infer::infer::canonical::{Canonical, OriginalQueryValues, QueryResponse};
1717
use rustc_infer::infer::error_reporting::TypeAnnotationNeeded::E0282;
1818
use rustc_infer::infer::{InferOk, InferResult};
19-
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AutoBorrow, AutoBorrowMutability};
19+
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AutoBorrow, AutoBorrowMutability, PointerCast};
2020
use rustc_middle::ty::fold::TypeFoldable;
2121
use rustc_middle::ty::subst::{
2222
self, GenericArgKind, InternalSubsts, Subst, SubstsRef, UserSelfTy, UserSubsts,
@@ -302,6 +302,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
302302
]) => {
303303
// A reborrow has no effect before a dereference.
304304
}
305+
(&[Adjustment { kind: Adjust::Pointer(PointerCast::ReifyFnPointer), .. }],
306+
&[Adjustment { kind: Adjust::Pointer(PointerCast::NotConstFnPointer), .. }]) => {
307+
entry.get_mut().push(adj[0].clone());
308+
return;
309+
}
305310
// FIXME: currently we never try to compose autoderefs
306311
// and ReifyFnPointer/UnsafeFnPointer, but we could.
307312
_ =>

0 commit comments

Comments
 (0)