about summary refs log tree commit diff
path: root/src/compiletest/common.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiletest/common.rs')
-rw-r--r--src/compiletest/common.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs
index 202a87fcdc9..c29f74d7418 100644
--- a/src/compiletest/common.rs
+++ b/src/compiletest/common.rs
@@ -43,9 +43,9 @@ impl FromStr for Mode {
     }
 }
 
-impl fmt::Show for Mode {
+impl fmt::String for Mode {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let msg = match *self {
+        fmt::String::fmt(match *self {
             CompileFail => "compile-fail",
             RunFail => "run-fail",
             RunPass => "run-pass",
@@ -54,8 +54,13 @@ impl fmt::Show for Mode {
             DebugInfoGdb => "debuginfo-gdb",
             DebugInfoLldb => "debuginfo-lldb",
             Codegen => "codegen",
-        };
-        msg.fmt(f)
+        }, f)
+    }
+}
+
+impl fmt::Show for Mode {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::String::fmt(self, f)
     }
 }