]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #14831 : alexcrichton/rust/format-intl, r=brson
authorbors <bors@rust-lang.org>
Fri, 13 Jun 2014 14:42:03 +0000 (14:42 +0000)
committerbors <bors@rust-lang.org>
Fri, 13 Jun 2014 14:42:03 +0000 (14:42 +0000)
* The select/plural methods from format strings are removed
* The # character no longer needs to be escaped
* The \-based escapes have been removed
* '{{' is now an escape for '{'
* '}}' is now an escape for '}'

Closes #14810
[breaking-change]

1  2 
src/libcore/fmt/mod.rs
src/librustc/middle/lint.rs
src/librustc/middle/resolve.rs
src/librustc/middle/ty.rs
src/libserialize/json.rs
src/libstd/path/windows.rs
src/libsyntax/parse/parser.rs
src/libtest/stats.rs
src/test/run-pass/ifmt.rs

index 0770c44dfbc1e28ccb952a64ba3b9a2fe4da73bf,a8d458664b8667be62658a455dcc19bd56c6724d..053dbbe5da9d8c983aa4a81b3d76021697bfe05a
@@@ -839,19 -753,11 +748,23 @@@ impl<T: Copy + Show> Show for Cell<T> 
      fn fmt(&self, f: &mut Formatter) -> Result {
          write!(f, r"Cell \{ value: {} \}", self.get())
      }
+     #[cfg(not(stage0))]
+     fn fmt(&self, f: &mut Formatter) -> Result {
+         write!(f, "Cell {{ value: {} }}", self.get())
+     }
  }
  
 +impl<'b, T: Show> Show for Ref<'b, T> {
 +    fn fmt(&self, f: &mut Formatter) -> Result {
 +        (**self).fmt(f)
 +    }
 +}
 +
 +impl<'b, T: Show> Show for RefMut<'b, T> {
 +    fn fmt(&self, f: &mut Formatter) -> Result {
 +        (*(self.deref())).fmt(f)
 +    }
 +}
 +
  // If you expected tests to be here, look instead at the run-pass/ifmt.rs test,
  // it's a lot easier than creating all of the rt::Piece structures here.
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge