Skip to content

Commit e965b75

Browse files
yodaldevoidvarkor
authored andcommitted
impl mk_const_infer
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
1 parent bd2fa22 commit e965b75

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/librustc/ty/context.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,6 +2678,18 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
26782678
self.mk_ty(Infer(it))
26792679
}
26802680

2681+
#[inline]
2682+
pub fn mk_const_infer(
2683+
self,
2684+
ic: InferConst<'tcx>,
2685+
ty: Ty<'tcx>,
2686+
) -> &'tcx LazyConst<'tcx> {
2687+
self.mk_lazy_const(LazyConst::Evaluated(ty::Const {
2688+
val: ConstValue::Infer(ic),
2689+
ty,
2690+
}))
2691+
}
2692+
26812693
#[inline]
26822694
pub fn mk_ty_param(self,
26832695
index: u32,

0 commit comments

Comments
 (0)