diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index 452b5a5251222..9ad3157fe6a1a 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -19,7 +19,6 @@ use std::cell::RefCell; use std::cmp::Equiv; use std::fmt; use std::hash::Hash; -use std::mem; use std::rc::Rc; pub struct Interner { @@ -192,16 +191,6 @@ impl StrInterner { (*self.vect.borrow().get(idx.uint())).clone() } - /// Returns this string with lifetime tied to the interner. Since - /// strings may never be removed from the interner, this is safe. - pub fn get_ref<'a>(&'a self, idx: Name) -> &'a str { - let vect = self.vect.borrow(); - let s: &str = vect.get(idx.uint()).as_slice(); - unsafe { - mem::transmute(s) - } - } - pub fn len(&self) -> uint { self.vect.borrow().len() }