Inline Const::ty() and Const::val() getters
This commit is contained in:
parent
4e1927db3c
commit
692bba64e6
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue