1
Fork 0

Inline Const::ty() and Const::val() getters

This commit is contained in:
Martin Gammelsæter 2022-04-13 14:10:37 +02:00
parent 4e1927db3c
commit 692bba64e6

View file

@ -44,10 +44,12 @@ pub struct ConstS<'tcx> {
static_assert_size!(ConstS<'_>, 48); static_assert_size!(ConstS<'_>, 48);
impl<'tcx> Const<'tcx> { impl<'tcx> Const<'tcx> {
#[inline]
pub fn ty(self) -> Ty<'tcx> { pub fn ty(self) -> Ty<'tcx> {
self.0.ty self.0.ty
} }
#[inline]
pub fn val(self) -> ConstKind<'tcx> { pub fn val(self) -> ConstKind<'tcx> {
self.0.val self.0.val
} }