about summary refs log tree commit diff
path: root/src/libsyntax_pos/lib.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-05-03 17:14:04 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2018-05-13 17:16:02 +1000
commit4465b2fbf3487e8f45e2eee4da187776574febec (patch)
tree4a8181eb588ff640050643f2694978c91add3666 /src/libsyntax_pos/lib.rs
parent6fc409ed0938cd2f501642abcaa675977fa5035a (diff)
downloadrust-4465b2fbf3487e8f45e2eee4da187776574febec.tar.gz
rust-4465b2fbf3487e8f45e2eee4da187776574febec.zip
Inline `char_at()` and `record_width`.
Because `bump()` is hot.
Diffstat (limited to 'src/libsyntax_pos/lib.rs')
-rw-r--r--src/libsyntax_pos/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index d30d3d78ca5..2bab958dced 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -1047,6 +1047,7 @@ impl FileMap {
         self.multibyte_chars.borrow_mut().push(mbc);
     }
 
+    #[inline]
     pub fn record_width(&self, pos: BytePos, ch: char) {
         let width = match ch {
             '\t' =>