about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-09-04 09:49:23 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-09-04 14:41:09 +1000
commit7a1bc79cbd6fbf5577e5216b8e2f3c29cbbacb29 (patch)
tree85a2c9621749f6b5240f87b173bd512321f66d9e /src/libsyntax_pos
parenta1cd79ff4e407ccaa1e3f7ac794812251600970c (diff)
downloadrust-7a1bc79cbd6fbf5577e5216b8e2f3c29cbbacb29.tar.gz
rust-7a1bc79cbd6fbf5577e5216b8e2f3c29cbbacb29.zip
Remove `LocalInternedString::intern`.
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/symbol.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 32ca1fdff93..5c603132701 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -1157,19 +1157,6 @@ pub struct LocalInternedString {
     string: &'static str,
 }
 
-impl LocalInternedString {
-    /// Maps a string to its interned representation.
-    pub fn intern(string: &str) -> Self {
-        let string = with_interner(|interner| {
-            let symbol = interner.intern(string);
-            interner.strings[symbol.0.as_usize()]
-        });
-        LocalInternedString {
-            string: unsafe { std::mem::transmute::<&str, &str>(string) }
-        }
-    }
-}
-
 impl<U: ?Sized> std::convert::AsRef<U> for LocalInternedString
 where
     str: std::convert::AsRef<U>