about summary refs log tree commit diff
path: root/src/libregex/parse.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libregex/parse.rs')
-rw-r--r--src/libregex/parse.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs
index 1cc2b271e9c..7331bc36d79 100644
--- a/src/libregex/parse.rs
+++ b/src/libregex/parse.rs
@@ -30,6 +30,7 @@ static MAX_REPEAT: uint = 1000;
 ///
 /// (Once an expression is compiled, it is not possible to produce an error
 /// via searching, splitting or replacing.)
+#[derive(Show)]
 pub struct Error {
     /// The *approximate* character index of where the error occurred.
     pub pos: uint,
@@ -37,7 +38,7 @@ pub struct Error {
     pub msg: String,
 }
 
-impl fmt::Show for Error {
+impl fmt::Display for Error {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "Regex syntax error near position {}: {:?}",
                self.pos, self.msg)