Skip to content

Commit 69423b3

Browse files
varkoryodaldevoid
andcommitted
Add stubs for fold_const
Co-Authored-By: Gabriel Smith <[email protected]>
1 parent bfc39b9 commit 69423b3

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/librustc/infer/freshen.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,8 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for TypeFreshener<'a, 'gcx, 'tcx> {
192192
ty::Bound(..) => bug!("unexpected type {:?}", t),
193193
}
194194
}
195+
196+
fn fold_const(&mut self, ct: &'tcx ty::LazyConst<'tcx>) -> &'tcx ty::LazyConst<'tcx> {
197+
ct // FIXME(const_generics)
198+
}
195199
}

src/librustc/infer/fudge.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,8 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for InferenceFudger<'a, 'gcx, 'tcx>
174174
}
175175
r
176176
}
177+
178+
fn fold_const(&mut self, ct: &'tcx ty::LazyConst<'tcx>) -> &'tcx ty::LazyConst<'tcx> {
179+
ct // FIXME(const_generics)
180+
}
177181
}

src/librustc/infer/opaque_types/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,10 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for ReverseMapper<'cx, 'gcx, 'tcx>
659659
_ => ty.super_fold_with(self),
660660
}
661661
}
662+
663+
fn fold_const(&mut self, ct: &'tcx ty::LazyConst<'tcx>) -> &'tcx ty::LazyConst<'tcx> {
664+
ct // FIXME(const_generics)
665+
}
662666
}
663667

664668
struct Instantiator<'a, 'gcx: 'tcx, 'tcx: 'a> {

src/librustc/ty/fold.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,10 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for BoundVarReplacer<'a, 'gcx, 'tcx>
505505
_ => r
506506
}
507507
}
508+
509+
fn fold_const(&mut self, ct: &'tcx ty::LazyConst<'tcx>) -> &'tcx ty::LazyConst<'tcx> {
510+
ct // FIXME(const_generics)
511+
}
508512
}
509513

510514
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
@@ -740,6 +744,10 @@ impl TypeFolder<'gcx, 'tcx> for Shifter<'a, 'gcx, 'tcx> {
740744
_ => ty.super_fold_with(self),
741745
}
742746
}
747+
748+
fn fold_const(&mut self, ct: &'tcx ty::LazyConst<'tcx>) -> &'tcx ty::LazyConst<'tcx> {
749+
ct // FIXME(const_generics)
750+
}
743751
}
744752

745753
pub fn shift_region<'a, 'gcx, 'tcx>(

0 commit comments

Comments
 (0)