diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/json.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 5d9427c72b8..1ccdc5042dd 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -603,6 +603,12 @@ impl of to_str::to_str for json { fn to_str() -> str { to_str(self) } } +impl of to_str::to_str for error { + fn to_str() -> str { + #fmt("%u:%u: %s", self.line, self.col, self.msg) + } +} + #[cfg(test)] mod tests { fn mk_dict(items: [(str, json)]) -> json { |
