Skip to content

Commit d76611f

Browse files
authored
Unrolled build for rust-lang#125903
Rollup merge of rust-lang#125903 - petrochenkov:upctxt3, r=nnethercote rustc_span: Inline some hot functions Found while benchmarking rust-lang#125829.
2 parents 5ee2dfd + 8530285 commit d76611f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_span/src/span_encoding.rs

+1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ impl Span {
216216

217217
// Returns either syntactic context, if it can be retrieved without taking the interner lock,
218218
// or an index into the interner if it cannot.
219+
#[inline]
219220
fn inline_ctxt(self) -> Result<SyntaxContext, usize> {
220221
Ok(if self.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER {
221222
if self.len_with_tag_or_marker & PARENT_TAG == 0 {

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2213,6 +2213,7 @@ impl fmt::Display for IdentPrinter {
22132213
pub struct MacroRulesNormalizedIdent(Ident);
22142214

22152215
impl MacroRulesNormalizedIdent {
2216+
#[inline]
22162217
pub fn new(ident: Ident) -> Self {
22172218
Self(ident.normalize_to_macro_rules())
22182219
}

0 commit comments

Comments
 (0)