mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Inline Const::ty() and Const::val() getters
This commit is contained in:
@@ -44,10 +44,12 @@ pub struct ConstS<'tcx> {
|
||||
static_assert_size!(ConstS<'_>, 48);
|
||||
|
||||
impl<'tcx> Const<'tcx> {
|
||||
#[inline]
|
||||
pub fn ty(self) -> Ty<'tcx> {
|
||||
self.0.ty
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn val(self) -> ConstKind<'tcx> {
|
||||
self.0.val
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user