summary refs log tree commit diff
path: root/src/librustc/session/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc/session/mod.rs')
-rw-r--r--src/librustc/session/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
index bd44dbe78f5..c1c55188875 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -75,13 +75,13 @@ impl Session {
     }
     pub fn span_err(&self, sp: Span, msg: &str) {
         match split_msg_into_multilines(msg) {
-            Some(msg) => self.diagnostic().span_err(sp, &msg[]),
+            Some(msg) => self.diagnostic().span_err(sp, &msg[..]),
             None => self.diagnostic().span_err(sp, msg)
         }
     }
     pub fn span_err_with_code(&self, sp: Span, msg: &str, code: &str) {
         match split_msg_into_multilines(msg) {
-            Some(msg) => self.diagnostic().span_err_with_code(sp, &msg[], code),
+            Some(msg) => self.diagnostic().span_err_with_code(sp, &msg[..], code),
             None => self.diagnostic().span_err_with_code(sp, msg, code)
         }
     }