about summary refs log tree commit diff
path: root/src/libstd/rope.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-28 00:22:18 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-28 00:22:28 -0700
commitbc9efaad9c978f71bd7ac2c91efbc957e25d43fb (patch)
tree5a966292079cbd3cbe120e939da824f119fd61a8 /src/libstd/rope.rs
parent467f2abdd8b676aed94364f09c8334b6627bd5b0 (diff)
downloadrust-bc9efaad9c978f71bd7ac2c91efbc957e25d43fb.tar.gz
rust-bc9efaad9c978f71bd7ac2c91efbc957e25d43fb.zip
std: Eliminate deprecated patterns
Diffstat (limited to 'src/libstd/rope.rs')
-rw-r--r--src/libstd/rope.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs
index 4680448e275..1d88b89277d 100644
--- a/src/libstd/rope.rs
+++ b/src/libstd/rope.rs
@@ -24,7 +24,6 @@
  */
 
 #[forbid(deprecated_mode)];
-#[forbid(deprecated_pattern)];
 
 /// The type of ropes.
 type Rope = node::Root;
@@ -738,14 +737,14 @@ mod node {
         //FIXME (#2744): Could we do this without the pattern-matching?
         match (*node) {
           Leaf(y)   => return y.byte_len,
-          Concat(y) => return y.byte_len
+          Concat(ref y) => return y.byte_len
         }
     }
 
     pure fn char_len(node: @Node) -> uint {
         match (*node) {
           Leaf(y)   => return y.char_len,
-          Concat(y) => return y.char_len
+          Concat(ref y) => return y.char_len
         }
     }
 
@@ -835,7 +834,7 @@ mod node {
     fn flatten(node: @Node) -> @Node unsafe {
         match (*node) {
           Leaf(_) => return node,
-          Concat(x) => {
+          Concat(ref x) => {
             return @Leaf({
                 byte_offset: 0u,
                 byte_len:    x.byte_len,
@@ -913,7 +912,7 @@ mod node {
                                 char_len:    char_len,
                                 content:     x.content});
               }
-              node::Concat(x) => {
+              node::Concat(ref x) => {
                 let left_len: uint = node::byte_len(x.left);
                 if byte_offset <= left_len {
                     if byte_offset + byte_len <= left_len {
@@ -976,7 +975,7 @@ mod node {
                            char_len:    char_len,
                            content:     x.content});
               }
-              node::Concat(x) => {
+              node::Concat(ref x) => {
                 if char_offset == 0u && char_len == x.char_len {return node;}
                 let left_len : uint = node::char_len(x.left);
                 if char_offset <= left_len {
@@ -1015,7 +1014,7 @@ mod node {
     fn height(node: @Node) -> uint {
         match (*node) {
           Leaf(_)   => return 0u,
-          Concat(x) => return x.height
+          Concat(ref x) => return x.height
         }
     }
 
@@ -1067,7 +1066,7 @@ mod node {
         loop {
             match (*current) {
               Leaf(x) => return it(x),
-              Concat(x) => if loop_leaves(x.left, it) { //non tail call
+              Concat(ref x) => if loop_leaves(x.left, it) { //non tail call
                 current = x.right;       //tail call
               } else {
                 return false;
@@ -1134,7 +1133,7 @@ mod node {
                 let current = it.stack[it.stackpos];
                 it.stackpos -= 1;
                 match (*current) {
-                  Concat(x) => {
+                  Concat(ref x) => {
                     it.stackpos += 1;
                     it.stack[it.stackpos] = x.right;
                     it.stackpos += 1;