summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-03-27 07:01:45 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-03-27 07:01:45 -0700
commitbd77e9433f5a76530c3d2acf0fa82caa5167e263 (patch)
treed8abffea8f956ae66ab2ced4ce27490fe1999177 /src/libsyntax/ext
parent2f1ab3a7fad9aeb871479470785250fe2e923e19 (diff)
downloadrust-bd77e9433f5a76530c3d2acf0fa82caa5167e263.tar.gz
rust-bd77e9433f5a76530c3d2acf0fa82caa5167e263.zip
syntax: pass some values around by reference
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/quote.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 9f3145e4e4e..a6f078d07b4 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -88,7 +88,7 @@ pub mod rt {
         }
     }
 
-    impl ToSource for ~[@ast::item] {
+    impl<'self> ToSource for &'self [@ast::item] {
         fn to_source(&self, cx: @ext_ctxt) -> ~str {
             str::connect(self.map(|i| i.to_source(cx)), ~"\n\n")
         }
@@ -100,7 +100,7 @@ pub mod rt {
         }
     }
 
-    impl ToSource for ~[@ast::Ty] {
+    impl<'self> ToSource for &'self [@ast::Ty] {
         fn to_source(&self, cx: @ext_ctxt) -> ~str {
             str::connect(self.map(|i| i.to_source(cx)), ~", ")
         }
@@ -216,7 +216,7 @@ pub mod rt {
         }
     }
 
-    impl ToTokens for ~[@ast::item] {
+    impl<'self> ToTokens for &'self [@ast::item] {
         fn to_tokens(&self, cx: @ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
@@ -228,7 +228,7 @@ pub mod rt {
         }
     }
 
-    impl ToTokens for ~[@ast::Ty] {
+    impl<'self> ToTokens for &'self [@ast::Ty] {
         fn to_tokens(&self, cx: @ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }