Skip to content

Commit 0889c9d

Browse files
committed
perf check: inline valtree constructors
1 parent 38b7215 commit 0889c9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/ty/consts/valtree.rs

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub enum ValTree<'tcx> {
3333
}
3434

3535
impl<'tcx> ValTree<'tcx> {
36+
#[inline(always)]
3637
pub fn zst() -> Self {
3738
Self::Branch(&[])
3839
}
@@ -60,6 +61,7 @@ impl<'tcx> ValTree<'tcx> {
6061
Self::Branch(interned)
6162
}
6263

64+
#[inline(always)]
6365
pub fn from_scalar_int(i: ScalarInt) -> Self {
6466
Self::Leaf(i)
6567
}

0 commit comments

Comments
 (0)