about summary refs log tree commit diff
path: root/src/libstd/fmt/parse.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-05-05 18:56:44 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-05-06 23:12:54 -0700
commit090040bf4037a094e50b03d79e4baf5cd89c912b (patch)
tree27fa91d623889d59260d3db167abdfa8c4288849 /src/libstd/fmt/parse.rs
parent24f6f26e633e50b5b59f9d0f6cca0b1e49e215d9 (diff)
librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, except
for `~str`/`~[]`.

Note that `~self` still remains, since I forgot to add support for
`Box<self>` before the snapshot.

How to update your code:

* Instead of `~EXPR`, you should write `box EXPR`.

* Instead of `~TYPE`, you should write `Box<Type>`.

* Instead of `~PATTERN`, you should write `box PATTERN`.

[breaking-change]
Diffstat (limited to 'src/libstd/fmt/parse.rs')
-rw-r--r--src/libstd/fmt/parse.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/fmt/parse.rs b/src/libstd/fmt/parse.rs
index 0ba8cff742b..ba126e00153 100644
--- a/src/libstd/fmt/parse.rs
+++ b/src/libstd/fmt/parse.rs
@@ -17,6 +17,7 @@
 use prelude::*;
 
 use char;
+use owned::Box;
 use str;
 
 /// A piece is a portion of the format string which represents the next part
@@ -41,7 +42,7 @@ pub struct Argument<'a> {
     /// How to format the argument
     pub format: FormatSpec<'a>,
     /// If not `None`, what method to invoke on the argument
-    pub method: Option<~Method<'a>>
+    pub method: Option<Box<Method<'a>>>
 }
 
 /// Specification for the formatting of an argument in the format string.
@@ -435,7 +436,7 @@ impl<'a> Parser<'a> {
 
     /// Parses a method to be applied to the previously specified argument and
     /// its format. The two current supported methods are 'plural' and 'select'
-    fn method(&mut self) -> Option<~Method<'a>> {
+    fn method(&mut self) -> Option<Box<Method<'a>>> {
         if !self.wsconsume(',') {
             return None;
         }
@@ -461,7 +462,7 @@ impl<'a> Parser<'a> {
     }
 
     /// Parses a 'select' statement (after the initial 'select' word)
-    fn select(&mut self) -> ~Method<'a> {
+    fn select(&mut self) -> Box<Method<'a>> {
         let mut other = None;
         let mut arms = vec!();
         // Consume arms one at a time
@@ -503,7 +504,7 @@ impl<'a> Parser<'a> {
     }
 
     /// Parses a 'plural' statement (after the initial 'plural' word)
-    fn plural(&mut self) -> ~Method<'a> {
+    fn plural(&mut self) -> Box<Method<'a>> {
         let mut offset = None;
         let mut other = None;
         let mut arms = vec!();