about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs20
-rw-r--r--src/libsyntax/ext/pipes/proto.rs4
2 files changed, 12 insertions, 12 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index a651090cf64..bc808495ca3 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -923,8 +923,8 @@ pub enum trait_method {
 pub enum int_ty { ty_i, ty_char, ty_i8, ty_i16, ty_i32, ty_i64, }
 
 pub impl int_ty : ToStr {
-    pure fn to_str() -> ~str {
-        ::ast_util::int_ty_to_str(self)
+    pure fn to_str(&self) -> ~str {
+        ::ast_util::int_ty_to_str(*self)
     }
 }
 
@@ -959,8 +959,8 @@ pub impl int_ty : cmp::Eq {
 pub enum uint_ty { ty_u, ty_u8, ty_u16, ty_u32, ty_u64, }
 
 pub impl uint_ty : ToStr {
-    pure fn to_str() -> ~str {
-        ::ast_util::uint_ty_to_str(self)
+    pure fn to_str(&self) -> ~str {
+        ::ast_util::uint_ty_to_str(*self)
     }
 }
 
@@ -993,8 +993,8 @@ pub impl uint_ty : cmp::Eq {
 pub enum float_ty { ty_f, ty_f32, ty_f64, }
 
 pub impl float_ty : ToStr {
-    pure fn to_str() -> ~str {
-        ::ast_util::float_ty_to_str(self)
+    pure fn to_str(&self) -> ~str {
+        ::ast_util::float_ty_to_str(*self)
     }
 }
 
@@ -1096,8 +1096,8 @@ pub enum Onceness {
 }
 
 pub impl Onceness : ToStr {
-    pure fn to_str() -> ~str {
-        match self {
+    pure fn to_str(&self) -> ~str {
+        match *self {
             Once => ~"once",
             Many => ~"many"
         }
@@ -1188,8 +1188,8 @@ pub enum purity {
 }
 
 pub impl purity : ToStr {
-    pure fn to_str() -> ~str {
-        match self {
+    pure fn to_str(&self) -> ~str {
+        match *self {
             impure_fn => ~"impure",
             unsafe_fn => ~"unsafe",
             pure_fn => ~"pure",
diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs
index 5c2dd82eb7f..6a1d9357694 100644
--- a/src/libsyntax/ext/pipes/proto.rs
+++ b/src/libsyntax/ext/pipes/proto.rs
@@ -34,8 +34,8 @@ pub impl direction : cmp::Eq {
 }
 
 pub impl direction: ToStr {
-    pure fn to_str() -> ~str {
-        match self {
+    pure fn to_str(&self) -> ~str {
+        match *self {
           send => ~"Send",
           recv => ~"Recv"
         }