1
Fork 0

change thir to use mir::ConstantKind instead of ty::Const

This commit is contained in:
b-naber 2022-02-21 22:43:15 +01:00
parent 9d843171d1
commit b38077ea0b
29 changed files with 534 additions and 112 deletions

View file

@ -85,6 +85,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
Constant { span, user_ty: None, literal }
}
ExprKind::ConstBlock { value } => {
Constant { span: span, user_ty: None, literal: value }
}
_ => span_bug!(span, "expression is not a valid constant {:?}", kind),
}
}