about summary refs log tree commit diff
path: root/src/librustc_errors/styled_buffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_errors/styled_buffer.rs')
-rw-r--r--src/librustc_errors/styled_buffer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/styled_buffer.rs b/src/librustc_errors/styled_buffer.rs
index 6e03618d2b0..b12ab9e4576 100644
--- a/src/librustc_errors/styled_buffer.rs
+++ b/src/librustc_errors/styled_buffer.rs
@@ -111,7 +111,7 @@ impl StyledBuffer {
 
     pub fn prepend(&mut self, line: usize, string: &str, style: Style) {
         self.ensure_lines(line);
-        let string_len = string.len();
+        let string_len = string.chars().count();
 
         // Push the old content over to make room for new content
         for _ in 0..string_len {