Skip to content

Commit 692bba6

Browse files
committed
Inline Const::ty() and Const::val() getters
1 parent 4e1927d commit 692bba6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/ty/consts.rs

+2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ pub struct ConstS<'tcx> {
4444
static_assert_size!(ConstS<'_>, 48);
4545

4646
impl<'tcx> Const<'tcx> {
47+
#[inline]
4748
pub fn ty(self) -> Ty<'tcx> {
4849
self.0.ty
4950
}
5051

52+
#[inline]
5153
pub fn val(self) -> ConstKind<'tcx> {
5254
self.0.val
5355
}

0 commit comments

Comments
 (0)