summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:21:21 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:40:19 -0800
commit492677ec1e4e66a57a2fce78962db2f89932dd74 (patch)
tree7215ca2d3af530efb17aee207f95365ca374ac00 /src/libsyntax/parse/lexer.rs
parent18a30aff4564437ccd2698be367ca98c81122ac0 (diff)
downloadrust-492677ec1e4e66a57a2fce78962db2f89932dd74.tar.gz
rust-492677ec1e4e66a57a2fce78962db2f89932dd74.zip
libsyntax: Change all uses of `&fn` to `||`.
Diffstat (limited to 'src/libsyntax/parse/lexer.rs')
-rw-r--r--src/libsyntax/parse/lexer.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index 06a2c557e42..26de9215dbf 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -216,16 +216,22 @@ fn byte_offset(rdr: &StringReader, pos: BytePos) -> BytePos {
 /// Calls `f` with a string slice of the source text spanning from `start`
 /// up to but excluding `rdr.last_pos`, meaning the slice does not include
 /// the character `rdr.curr`.
-pub fn with_str_from<T>(rdr: @mut StringReader, start: BytePos, f: &fn(s: &str) -> T) -> T {
+pub fn with_str_from<T>(
+                     rdr: @mut StringReader,
+                     start: BytePos,
+                     f: |s: &str| -> T)
+                     -> T {
     with_str_from_to(rdr, start, rdr.last_pos, f)
 }
 
 /// Calls `f` with astring slice of the source text spanning from `start`
 /// up to but excluding `end`.
-fn with_str_from_to<T>(rdr: @mut StringReader,
-                       start: BytePos,
-                       end: BytePos,
-                       f: &fn(s: &str) -> T) -> T {
+fn with_str_from_to<T>(
+                    rdr: @mut StringReader,
+                    start: BytePos,
+                    end: BytePos,
+                    f: |s: &str| -> T)
+                    -> T {
     f(rdr.src.slice(
             byte_offset(rdr, start).to_uint(),
             byte_offset(rdr, end).to_uint()))