Skip to content

Commit c877989

Browse files
committed
Add some #[inline] attributes
1 parent 7e08576 commit c877989

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libsyntax_pos/symbol.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,7 @@ impl LocalInternedString {
11311131
}
11321132
}
11331133

1134+
#[inline]
11341135
pub fn get(&self) -> &str {
11351136
// This returns a valid string since we ensure that `self` outlives the interner
11361137
// 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
11441145
where
11451146
str: std::convert::AsRef<U>
11461147
{
1148+
#[inline]
11471149
fn as_ref(&self) -> &U {
11481150
self.string.as_ref()
11491151
}
@@ -1184,6 +1186,7 @@ impl !Sync for LocalInternedString {}
11841186

11851187
impl std::ops::Deref for LocalInternedString {
11861188
type Target = str;
1189+
#[inline]
11871190
fn deref(&self) -> &str { self.string }
11881191
}
11891192

0 commit comments

Comments
 (0)