about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-06-25 04:00:03 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-06-25 04:38:01 +0200
commitc877989655d151972cd6a9c60450951a2efa0513 (patch)
tree0f29b9955b2a6ef18d589f04b4ad46edd8514010 /src/libsyntax_pos
parent7e08576e4276a97b523c25bfd196d419c39c7b87 (diff)
downloadrust-c877989655d151972cd6a9c60450951a2efa0513.tar.gz
rust-c877989655d151972cd6a9c60450951a2efa0513.zip
Add some #[inline] attributes
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/symbol.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 756bc8c29d8..18c379f61f8 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -1131,6 +1131,7 @@ impl LocalInternedString {
         }
     }
 
+    #[inline]
     pub fn get(&self) -> &str {
         // This returns a valid string since we ensure that `self` outlives the interner
         // by creating the interner on a thread which outlives threads which can access it.
@@ -1144,6 +1145,7 @@ impl<U: ?Sized> std::convert::AsRef<U> for LocalInternedString
 where
     str: std::convert::AsRef<U>
 {
+    #[inline]
     fn as_ref(&self) -> &U {
         self.string.as_ref()
     }
@@ -1184,6 +1186,7 @@ impl !Sync for LocalInternedString {}
 
 impl std::ops::Deref for LocalInternedString {
     type Target = str;
+    #[inline]
     fn deref(&self) -> &str { self.string }
 }