From: bors Date: Fri, 13 Jun 2014 14:42:03 +0000 (+0000) Subject: auto merge of #14831 : alexcrichton/rust/format-intl, r=brson X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=0422934e243ed57a7662ec878db9d4e01ca5b0f9;p=rust.git auto merge of #14831 : alexcrichton/rust/format-intl, r=brson * 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] --- 0422934e243ed57a7662ec878db9d4e01ca5b0f9 diff --cc src/libcore/fmt/mod.rs index 0770c44dfbc,a8d458664b8..053dbbe5da9 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@@ -839,19 -753,11 +748,23 @@@ impl Show for Cell 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.