about summary refs log tree commit diff
path: root/src/libstd/fmt
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/fmt')
-rw-r--r--src/libstd/fmt/mod.rs3
-rw-r--r--src/libstd/fmt/parse.rs9
2 files changed, 7 insertions, 5 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs
index e225dc42e05..38456e195e3 100644
--- a/src/libstd/fmt/mod.rs
+++ b/src/libstd/fmt/mod.rs
@@ -492,6 +492,7 @@ use io;
 use iter::{Iterator, range};
 use num::Signed;
 use option::{Option,Some,None};
+use owned::Box;
 use repr;
 use result::{Ok, Err};
 use str::StrSlice;
@@ -1113,7 +1114,7 @@ pub fn argumentuint<'a>(s: &'a uint) -> Argument<'a> {
 impl<T: Show> Show for @T {
     fn fmt(&self, f: &mut Formatter) -> Result { secret_show(&**self, f) }
 }
-impl<T: Show> Show for ~T {
+impl<T: Show> Show for Box<T> {
     fn fmt(&self, f: &mut Formatter) -> Result { secret_show(&**self, f) }
 }
 impl<'a, T: Show> Show for &'a T {
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!();