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.