about summary refs log tree commit diff
path: root/src/librustc_llvm/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_llvm/lib.rs')
-rw-r--r--src/librustc_llvm/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs
index 36300d9efee..9d23397ade0 100644
--- a/src/librustc_llvm/lib.rs
+++ b/src/librustc_llvm/lib.rs
@@ -13,6 +13,12 @@ pub struct RustString {
     pub bytes: RefCell<Vec<u8>>,
 }
 
+impl RustString {
+    pub fn len(&self) -> usize {
+        self.bytes.borrow().len()
+    }
+}
+
 /// Appending to a Rust string -- used by RawRustStringOstream.
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]