self.debugging_opt(NO_LANDING_PADS)
}
- // pointless function, now...
- pub fn str_of(&self, id: ast::Ident) -> @str {
- token::ident_to_str(&id)
+ // DEPRECATED. This function results in a lot of allocations when they
+ // are not necessary.
+ pub fn str_of(&self, id: ast::Ident) -> ~str {
+ let string = token::get_ident(id.name);
+ string.get().to_str()
}
// pointless function, now...
match ty::get(ty).sty {
ty::ty_bool => {
match *ctor {
- val(const_bool(true)) => Some(@"true"),
- val(const_bool(false)) => Some(@"false"),
+ val(const_bool(true)) => Some(~"true"),
+ val(const_bool(false)) => Some(~"false"),
_ => None
}
}
}
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
match *ctor {
- vec(n) => Some(format!("vectors of length {}", n).to_managed()),
+ vec(n) => Some(format!("vectors of length {}", n)),
_ => None
}
}
}
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 {