From c877989655d151972cd6a9c60450951a2efa0513 Mon Sep 17 00:00:00 2001 From: John Kåre Alsaker Date: Tue, 25 Jun 2019 04:00:03 +0200 Subject: Add some #[inline] attributes --- src/libsyntax_pos/symbol.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libsyntax_pos') 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 std::convert::AsRef for LocalInternedString where str: std::convert::AsRef { + #[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 } } -- cgit 1.4.1-3-g733a5