about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/constraint_generation.rs
diff options
context:
space:
mode:
authorAlan Egerton <eggyal@gmail.com>2022-06-17 13:10:07 +0100
committerAlan Egerton <eggyal@gmail.com>2022-07-05 22:25:43 +0100
commite9e5d0685b0d1e068b1511242b6da9e57a74561f (patch)
tree2a53a59ce5ebc574c0d32b61b1327dfb4570fe7f /compiler/rustc_borrowck/src/constraint_generation.rs
parentf66c06f7f2341bfe5935c470be53c8e6767717f3 (diff)
downloadrust-e9e5d0685b0d1e068b1511242b6da9e57a74561f.tar.gz
rust-e9e5d0685b0d1e068b1511242b6da9e57a74561f.zip
Relax constrained generics to TypeVisitable
Diffstat (limited to 'compiler/rustc_borrowck/src/constraint_generation.rs')
-rw-r--r--compiler/rustc_borrowck/src/constraint_generation.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/constraint_generation.rs b/compiler/rustc_borrowck/src/constraint_generation.rs
index d34c6d9dee5..a2011c88d3a 100644
--- a/compiler/rustc_borrowck/src/constraint_generation.rs
+++ b/compiler/rustc_borrowck/src/constraint_generation.rs
@@ -7,6 +7,7 @@ use rustc_middle::mir::{
 };
 use rustc_middle::ty::fold::TypeFoldable;
 use rustc_middle::ty::subst::SubstsRef;
+use rustc_middle::ty::visit::TypeVisitable;
 use rustc_middle::ty::{self, RegionVid, Ty};
 
 use crate::{
@@ -163,7 +164,7 @@ impl<'cx, 'cg, 'tcx> ConstraintGeneration<'cx, 'cg, 'tcx> {
     /// `location`.
     fn add_regular_live_constraint<T>(&mut self, live_ty: T, location: Location)
     where
-        T: TypeFoldable<'tcx>,
+        T: TypeVisitable<'tcx>,
     {
         debug!("add_regular_live_constraint(live_ty={:?}, location={:?})", live_ty, location);