1
Fork 0

Lower inline const down to MIR

This commit is contained in:
Santiago Pastorino 2020-10-06 17:51:15 -03:00
parent 66e254314d
commit fe922e567f
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
12 changed files with 41 additions and 1 deletions

View file

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