Skip to content

Commit 25a2797

Browse files
committed
Add Clone to the list of bounds for a TypeFolder. (Kill?)
1 parent 7d68250 commit 25a2797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/middle/ty_fold.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub trait TypeFolder<'tcx> : Sized {
7171
fn exit_region_binder(&mut self) { }
7272

7373
fn fold_binder<T>(&mut self, t: &ty::Binder<T>) -> ty::Binder<T>
74-
where T : TypeFoldable<'tcx> + Repr<'tcx>
74+
where T : TypeFoldable<'tcx> + Repr<'tcx> + Clone
7575
{
7676
// FIXME(#20526) this should replace `enter_region_binder`/`exit_region_binder`.
7777
super_fold_binder(self, t)
@@ -186,7 +186,7 @@ impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Vec<T> {
186186
}
187187
}
188188

189-
impl<'tcx, T:TypeFoldable<'tcx>+Repr<'tcx>> TypeFoldable<'tcx> for ty::Binder<T> {
189+
impl<'tcx, T:TypeFoldable<'tcx>+Repr<'tcx>+Clone> TypeFoldable<'tcx> for ty::Binder<T> {
190190
fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> ty::Binder<T> {
191191
folder.fold_binder(self)
192192
}

0 commit comments

Comments
 (0)