Skip to content

Commit b9878b2

Browse files
committed
Try inline(always)
1 parent 3a76b79 commit b9878b2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compiler/rustc_expand/src/mbe/transcribe.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub(super) fn transcribe<'a>(
289289
}
290290

291291
/// Turn `$(...)*` sequences into tokens.
292-
#[inline] // called once
292+
#[inline(always)] // called once
293293
fn transcribe_sequence<'tx, 'itp>(
294294
tscx: &mut TranscrCtx<'tx, 'itp>,
295295
seq: &mbe::TokenTree,
@@ -358,7 +358,7 @@ fn transcribe_sequence<'tx, 'itp>(
358358
/// producing "xyz", which is bad because it effectively merges tokens.
359359
/// `Spacing::Alone` is the safer option. Fortunately, `space_between` will avoid
360360
/// some of the unnecessary whitespace.
361-
#[inline] // called once
361+
#[inline(always)] // called once
362362
fn transcribe_metavar<'tx>(
363363
tscx: &mut TranscrCtx<'tx, '_>,
364364
mut sp: Span,
@@ -494,7 +494,7 @@ fn transcribe_metavar<'tx>(
494494
}
495495

496496
/// Turn `${expr(...)}` metavariable expressionss into tokens.
497-
#[inline] // called once
497+
#[inline(always)] // called once
498498
fn transcribe_metavar_expr<'tx>(
499499
tscx: &mut TranscrCtx<'tx, '_>,
500500
dspan: DelimSpan,
@@ -540,7 +540,7 @@ fn transcribe_metavar_expr<'tx>(
540540
}
541541

542542
/// Handle the `${concat(...)}` metavariable expression.
543-
#[inline] // called once
543+
#[inline(always)] // called once
544544
fn metavar_expr_concat<'tx>(
545545
tscx: &mut TranscrCtx<'tx, '_>,
546546
dspan: DelimSpan,
@@ -621,7 +621,7 @@ fn metavar_expr_concat<'tx>(
621621
/// These are typically used for passing larger amounts of code, and tokens in that code usually
622622
/// combine with each other and not with tokens outside of the sequence.
623623
/// - The metavariable span comes from a different crate, then we prefer the more local span.
624-
#[inline] // called once
624+
#[inline(always)] // called once
625625
fn maybe_use_metavar_location(
626626
psess: &ParseSess,
627627
stack: &[Frame<'_>],
@@ -813,13 +813,13 @@ fn lockstep_iter_size(
813813
/// * `[ $( ${count(foo, 0)} ),* ]` will be the same as `[ $( ${count(foo)} ),* ]`
814814
/// * `[ $( ${count(foo, 1)} ),* ]` will return an error because `${count(foo, 1)}` is
815815
/// declared inside a single repetition and the index `1` implies two nested repetitions.
816-
#[inline] // called once
816+
#[inline(always)] // called once
817817
fn count_repetitions<'dx>(
818818
dcx: DiagCtxtHandle<'dx>,
819819
depth_user: usize,
820820
mut matched: &NamedMatch,
821821
repeats: &[(usize, usize)],
822-
sp: &DelimSpan,
822+
sp: DelimSpan,
823823
) -> PResult<'dx, usize> {
824824
// Recursively count the number of matches in `matched` at given depth
825825
// (or at the top-level of `matched` if no depth is given).

0 commit comments

Comments
 (0)