]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/common.rs
librustc: De-`@str` `ident()` and `str_of()`
[rust.git] / src / librustc / middle / trans / common.rs
index a17ad98e42666154bb2a5de53731edbcf3c72e27..04789b9ca706d955edd4dc3c9dd1131746bfe5f6 100644 (file)
@@ -446,8 +446,9 @@ pub fn tcx(&self) -> ty::ctxt {
     }
     pub fn sess(&self) -> Session { self.fcx.ccx.sess }
 
-    pub fn ident(&self, ident: Ident) -> @str {
-        token::ident_to_str(&ident)
+    pub fn ident(&self, ident: Ident) -> ~str {
+        let string = token::get_ident(ident.name);
+        string.get().to_str()
     }
 
     pub fn node_id_to_str(&self, id: ast::NodeId) -> ~str {