don't polymorphize without a reason to
This commit is contained in:
parent
ef5808a035
commit
c6454dd582
1 changed files with 1 additions and 2 deletions
|
@ -153,8 +153,7 @@ impl<'tcx> TailCallCkVisitor<'_, 'tcx> {
|
||||||
fn needs_location(&self, ty: Ty<'tcx>) -> bool {
|
fn needs_location(&self, ty: Ty<'tcx>) -> bool {
|
||||||
if let &ty::FnDef(did, substs) = ty.kind() {
|
if let &ty::FnDef(did, substs) = ty.kind() {
|
||||||
let instance =
|
let instance =
|
||||||
ty::Instance::expect_resolve(self.tcx, self.typing_env, did, substs, DUMMY_SP)
|
ty::Instance::expect_resolve(self.tcx, self.typing_env, did, substs, DUMMY_SP);
|
||||||
.polymorphize(self.tcx);
|
|
||||||
|
|
||||||
instance.def.requires_caller_location(self.tcx)
|
instance.def.requires_caller_location(self.tcx)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue