]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/lib/llvm.rs
core: rename strbuf::StrBuf to string::String
[rust.git] / src / librustc / lib / llvm.rs
index dacda4e2a0b7c7bb3abffb5ede781e7a58196099..bc403d5a76c1da1789f1fbec8157634e30027655 100644 (file)
@@ -1862,7 +1862,7 @@ pub fn SetFunctionAttribute(fn_: ValueRef, attr: Attribute) {
 /* Memory-managed object interface to type handles. */
 
 pub struct TypeNames {
-    named_types: RefCell<HashMap<StrBuf, TypeRef>>,
+    named_types: RefCell<HashMap<String, TypeRef>>,
 }
 
 impl TypeNames {
@@ -1881,7 +1881,7 @@ pub fn find_type(&self, s: &str) -> Option<Type> {
         self.named_types.borrow().find_equiv(&s).map(|x| Type::from_ref(*x))
     }
 
-    pub fn type_to_str(&self, ty: Type) -> StrBuf {
+    pub fn type_to_str(&self, ty: Type) -> String {
         unsafe {
             let s = llvm::LLVMTypeToString(ty.to_ref());
             let ret = from_c_str(s);
@@ -1890,12 +1890,12 @@ pub fn type_to_str(&self, ty: Type) -> StrBuf {
         }
     }
 
-    pub fn types_to_str(&self, tys: &[Type]) -> StrBuf {
-        let strs: Vec<StrBuf> = tys.iter().map(|t| self.type_to_str(*t)).collect();
+    pub fn types_to_str(&self, tys: &[Type]) -> String {
+        let strs: Vec<String> = tys.iter().map(|t| self.type_to_str(*t)).collect();
         format_strbuf!("[{}]", strs.connect(",").to_strbuf())
     }
 
-    pub fn val_to_str(&self, val: ValueRef) -> StrBuf {
+    pub fn val_to_str(&self, val: ValueRef) -> String {
         unsafe {
             let s = llvm::LLVMValueToString(val);
             let ret = from_c_str(s);