Skip to content

Commit 7b7e325

Browse files
committed
early exit expand abstract consts
1 parent 1a44434 commit 7b7e325

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_middle/src/ty/abstract_const.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ pub type BoundAbstractConst<'tcx> =
3535

3636
impl<'tcx> TyCtxt<'tcx> {
3737
pub fn expand_abstract_consts<T: TypeFoldable<TyCtxt<'tcx>>>(self, ac: T) -> T {
38+
if !self.features().generic_const_exprs() {
39+
return ac
40+
}
41+
3842
struct Expander<'tcx> {
3943
tcx: TyCtxt<'tcx>,
4044
}

0 commit comments

Comments
 (0)