From 00f06a1eea36ed445ed58fbc12545bce83783919 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 14 Mar 2023 16:08:02 +0000 Subject: [PATCH 1/2] inline --- compiler/rustc_middle/src/ty/fast_reject.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_middle/src/ty/fast_reject.rs b/compiler/rustc_middle/src/ty/fast_reject.rs index ee505742be9a0..40de2901a5645 100644 --- a/compiler/rustc_middle/src/ty/fast_reject.rs +++ b/compiler/rustc_middle/src/ty/fast_reject.rs @@ -103,6 +103,7 @@ pub enum TreatProjections { /// is only correct if they are fully normalized. /// /// ยน meaning that if the outermost layers are different, then the whole types are also different. +#[inline(always)] pub fn simplify_type<'tcx>( tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, From 41b0bc1087941e07b6e5575d04b9424392f232f6 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 15 Mar 2023 00:53:42 +0000 Subject: [PATCH 2/2] inline more --- compiler/rustc_middle/src/ty/trait_def.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_middle/src/ty/trait_def.rs b/compiler/rustc_middle/src/ty/trait_def.rs index bf2b121f704af..e62b08f4b1080 100644 --- a/compiler/rustc_middle/src/ty/trait_def.rs +++ b/compiler/rustc_middle/src/ty/trait_def.rs @@ -118,6 +118,7 @@ impl<'tcx> TyCtxt<'tcx> { /// Iterate over every impl that could possibly match the self type `self_ty`. /// /// `trait_def_id` MUST BE the `DefId` of a trait. + #[inline(always)] pub fn for_each_relevant_impl( self, trait_def_id: DefId, @@ -132,6 +133,7 @@ impl<'tcx> TyCtxt<'tcx> { ) } + #[inline(always)] pub fn for_each_relevant_impl_treating_projections( self, trait_def_id: DefId,