]> git.lizzy.rs Git - rust.git/commitdiff
Reduce `Symbol`'s interface slightly.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 9 May 2019 04:06:10 +0000 (14:06 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Fri, 10 May 2019 05:59:13 +0000 (15:59 +1000)
src/libsyntax_pos/symbol.rs

index 231cfb793f84412fa8c58e285758beae7dba8db8..d0ba09af30b061cbd1e3084851b0f848000fd075 100644 (file)
@@ -380,10 +380,6 @@ pub fn intern(string: &str) -> Self {
         with_interner(|interner| interner.intern(string))
     }
 
-    pub fn interned(self) -> Self {
-        with_interner(|interner| interner.interned(self))
-    }
-
     /// Gensyms a new `usize`, using the current interner.
     pub fn gensym(string: &str) -> Self {
         with_interner(|interner| interner.gensym(string))
@@ -502,7 +498,7 @@ pub fn intern(&mut self, string: &str) -> Symbol {
         name
     }
 
-    pub fn interned(&self, symbol: Symbol) -> Symbol {
+    fn interned(&self, symbol: Symbol) -> Symbol {
         if (symbol.0.as_usize()) < self.strings.len() {
             symbol
         } else {