From 692bba64e6aa4ab72029c077915dbaa37782091c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gammels=C3=A6ter?= Date: Wed, 13 Apr 2022 14:10:37 +0200 Subject: [PATCH] Inline Const::ty() and Const::val() getters --- compiler/rustc_middle/src/ty/consts.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs index 4b7c1d44cea29..7af7eb4f5ecfd 100644 --- a/compiler/rustc_middle/src/ty/consts.rs +++ b/compiler/rustc_middle/src/ty/consts.rs @@ -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 }