Skip to content

Commit aa1d580

Browse files
committed
Added some inlining hints, that seem to improve performance.
1 parent 28b83ee commit aa1d580

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_middle/src/ty/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,6 +2425,7 @@ impl<'tcx, T: 'tcx + ?Sized> IntoPointer for InternedInSet<'tcx, T> {
24252425

24262426
#[allow(rustc::usage_of_ty_tykind)]
24272427
impl<'tcx, T> Borrow<T> for InternedInSet<'tcx, WithCachedTypeInfo<T>> {
2428+
#[inline]
24282429
fn borrow(&self) -> &T {
24292430
&self.0.internee
24302431
}

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,11 @@ impl<'tcx> rustc_type_ir::inherent::IntoKind for Ty<'tcx> {
440440
}
441441

442442
impl<'tcx> rustc_type_ir::visit::Flags for Ty<'tcx> {
443+
#[inline]
443444
fn flags(&self) -> TypeFlags {
444445
self.0.flags
445446
}
446-
447+
#[inline]
447448
fn outer_exclusive_binder(&self) -> DebruijnIndex {
448449
self.0.outer_exclusive_binder
449450
}

0 commit comments

Comments
 (0)