Skip to content

Commit

Permalink
Unrolled build for rust-lang#125903
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#125903 - petrochenkov:upctxt3, r=nnethercote

rustc_span: Inline some hot functions

Found while benchmarking rust-lang#125829.
  • Loading branch information
rust-timer authored Jun 5, 2024
2 parents 5ee2dfd + 8530285 commit d76611f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_span/src/span_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ impl Span {

// Returns either syntactic context, if it can be retrieved without taking the interner lock,
// or an index into the interner if it cannot.
#[inline]
fn inline_ctxt(self) -> Result<SyntaxContext, usize> {
Ok(if self.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER {
if self.len_with_tag_or_marker & PARENT_TAG == 0 {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2213,6 +2213,7 @@ impl fmt::Display for IdentPrinter {
pub struct MacroRulesNormalizedIdent(Ident);

impl MacroRulesNormalizedIdent {
#[inline]
pub fn new(ident: Ident) -> Self {
Self(ident.normalize_to_macro_rules())
}
Expand Down

0 comments on commit d76611f

Please sign in to comment.