Skip to content

Commit

Permalink
Inline {args,consts}_may_unify.
Browse files Browse the repository at this point in the history
This speeds up compilation of `bitmaps-3.1.0` and `typenum-1.17.0`.
  • Loading branch information
nnethercote committed May 2, 2024
1 parent 29ff7f0 commit e0fd8dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/ty/fast_reject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ pub struct DeepRejectCtxt {
}

impl DeepRejectCtxt {
#[inline]
pub fn args_may_unify<'tcx>(
self,
obligation_args: GenericArgsRef<'tcx>,
Expand Down Expand Up @@ -329,6 +330,7 @@ impl DeepRejectCtxt {
}
}

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

0 comments on commit e0fd8dd

Please sign in to comment.