Skip to content

Commit

Permalink
Resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
filtsin committed Oct 14, 2020
1 parent be46b44 commit c772728
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use rustc_hir::{ExprKind, GenericArg, Node, QPath};
use rustc_infer::infer::canonical::{Canonical, OriginalQueryValues, QueryResponse};
use rustc_infer::infer::error_reporting::TypeAnnotationNeeded::E0282;
use rustc_infer::infer::{InferOk, InferResult};
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AutoBorrow, AutoBorrowMutability};
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AutoBorrow, AutoBorrowMutability, PointerCast};
use rustc_middle::ty::fold::TypeFoldable;
use rustc_middle::ty::subst::{
self, GenericArgKind, InternalSubsts, Subst, SubstsRef, UserSelfTy, UserSubsts,
Expand Down Expand Up @@ -302,6 +302,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
]) => {
// A reborrow has no effect before a dereference.
}
(&[Adjustment { kind: Adjust::Pointer(PointerCast::ReifyFnPointer), .. }],
&[Adjustment { kind: Adjust::Pointer(PointerCast::NotConstFnPointer), .. }]) => {
entry.get_mut().push(adj[0].clone());
return;
}
// FIXME: currently we never try to compose autoderefs
// and ReifyFnPointer/UnsafeFnPointer, but we could.
_ =>
Expand Down

0 comments on commit c772728

Please sign in to comment.