about summary refs log tree commit diff
path: root/src/libstd/json.rs
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-07-11 23:42:26 -0700
committerMichael Sullivan <sully@msully.net>2012-07-12 16:52:26 -0700
commit2ea9c8df0f7c9ee72913883128b37d0a80d2f4f6 (patch)
treeb3e4acbf2912f804cb45f87e8819a5e4847ec213 /src/libstd/json.rs
parentacb86921a62ba01726fd922f55d0176fa6c1df7c (diff)
downloadrust-2ea9c8df0f7c9ee72913883128b37d0a80d2f4f6.tar.gz
rust-2ea9c8df0f7c9ee72913883128b37d0a80d2f4f6.zip
Accept prefix notation for writing the types of str/~ and friends.
Diffstat (limited to 'src/libstd/json.rs')
-rw-r--r--src/libstd/json.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index 9f51ab157b7..da86b9d4df0 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -29,7 +29,7 @@ export null;
 /// Represents a json value
 enum json {
     num(float),
-    string(@str),
+    string(@str/~),
     boolean(bool),
     list(@~[json]),
     dict(map::hashmap<str, json>),
@@ -39,7 +39,7 @@ enum json {
 type error = {
     line: uint,
     col: uint,
-    msg: @str,
+    msg: @str/~,
 };
 
 /// Serializes a json value into a io::writer
@@ -324,7 +324,7 @@ impl parser for parser {
         ok(res)
     }
 
-    fn parse_str() -> result<@str, error> {
+    fn parse_str() -> result<@str/~, error> {
         let mut escape = false;
         let mut res = "";
 
@@ -579,7 +579,7 @@ impl of to_json for str {
     fn to_json() -> json { string(@copy self) }
 }
 
-impl of to_json for @str {
+impl of to_json for @str/~ {
     fn to_json() -> json { string(self) }
 }