diff options
| author | Martin Gammelsæter <martin@mg.am> | 2022-04-13 14:10:37 +0200 |
|---|---|---|
| committer | Martin Gammelsæter <martin@mg.am> | 2022-04-13 14:10:37 +0200 |
| commit | 692bba64e6aa4ab72029c077915dbaa37782091c (patch) | |
| tree | d3431989002c25495c1f4cc55a2362e6466b5914 /compiler | |
| parent | 4e1927db3c399fa34dc71992bd5dbec09f945c3d (diff) | |
| download | rust-692bba64e6aa4ab72029c077915dbaa37782091c.tar.gz rust-692bba64e6aa4ab72029c077915dbaa37782091c.zip | |
Inline Const::ty() and Const::val() getters
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/consts.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs index 4b7c1d44cea..7af7eb4f5ec 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 } |
