diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-06-03 01:01:18 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-06-03 01:01:18 +0300 |
| commit | 8530285f4ef240bf748cb207fa7d1794dca2e68f (patch) | |
| tree | 3d09e4e36558c37f5bef48857e78594847fe493f | |
| parent | a6416d8907bc94ef1a032d54cb0443cde963e455 (diff) | |
| download | rust-8530285f4ef240bf748cb207fa7d1794dca2e68f.tar.gz rust-8530285f4ef240bf748cb207fa7d1794dca2e68f.zip | |
rustc_span: Inline some hot functions
| -rw-r--r-- | compiler/rustc_span/src/span_encoding.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/span_encoding.rs b/compiler/rustc_span/src/span_encoding.rs index 788a52faf56..6a028226631 100644 --- a/compiler/rustc_span/src/span_encoding.rs +++ b/compiler/rustc_span/src/span_encoding.rs @@ -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 { diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 61ca0d54ca4..fe883e03c44 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -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()) } |
