diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-29 11:18:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-29 11:18:11 +0200 |
| commit | 94a066e229e2f6f4efbde1ae3caa067b0aaa69a2 (patch) | |
| tree | 7b2f3d69bb1e3aa27b562a1f44c35dce71ea8e5e /src/libsyntax_pos | |
| parent | a4cf85e958f2a14c501821afba0754b5feba45df (diff) | |
| parent | 11221d120f8f79ff8e6ad35256874f30a942908b (diff) | |
| download | rust-94a066e229e2f6f4efbde1ae3caa067b0aaa69a2.tar.gz rust-94a066e229e2f6f4efbde1ae3caa067b0aaa69a2.zip | |
Rollup merge of #62104 - Zoxc:query-info, r=eddyb
Inform the query system about properties of queries at compile time
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/symbol.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index bd9a9061b99..266bd2a04a2 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -1132,6 +1132,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. @@ -1145,6 +1146,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() } @@ -1185,6 +1187,7 @@ impl !Sync for LocalInternedString {} impl std::ops::Deref for LocalInternedString { type Target = str; + #[inline] fn deref(&self) -> &str { self.string } } |
