about summary refs log tree commit diff
path: root/src/libregex/re.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libregex/re.rs')
-rw-r--r--src/libregex/re.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libregex/re.rs b/src/libregex/re.rs
index cb2690ce80c..37f9869f3bf 100644
--- a/src/libregex/re.rs
+++ b/src/libregex/re.rs
@@ -90,10 +90,19 @@ impl Clone for ExNative {
     }
 }
 
+#[cfg(stage0)]
+//FIXME: remove after stage0 snapshot
 impl fmt::Show for Regex {
     /// Shows the original regular expression.
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.as_str())
+        fmt::String::fmt(self.as_str(), f)
+    }
+}
+
+impl fmt::String for Regex {
+    /// Shows the original regular expression.
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::String::fmt(self.as_str(), f)
     }
 }