Skip to content

Commit e0fd8dd

Browse files
committed
Inline {args,consts}_may_unify.
This speeds up compilation of `bitmaps-3.1.0` and `typenum-1.17.0`.
1 parent 29ff7f0 commit e0fd8dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/ty/fast_reject.rs

+2
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ pub struct DeepRejectCtxt {
167167
}
168168

169169
impl DeepRejectCtxt {
170+
#[inline]
170171
pub fn args_may_unify<'tcx>(
171172
self,
172173
obligation_args: GenericArgsRef<'tcx>,
@@ -329,6 +330,7 @@ impl DeepRejectCtxt {
329330
}
330331
}
331332

333+
#[inline(always)]
332334
pub fn consts_may_unify(self, obligation_ct: ty::Const<'_>, impl_ct: ty::Const<'_>) -> bool {
333335
let k = impl_ct.kind();
334336
let impl_val = match k {

0 commit comments

Comments
 (0)