diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 3d24f8902bd83827be8aee45f393f9cf9f9e33a6..28f1da27bdb57670214cd4ef4b8af871cb3c3c65 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -185,6 +185,7 @@ fn hash(&self, state: &mut H) { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Debug for [T; $N] { + #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Debug::fmt(&&self[..], f) } diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs index 03e7a9a49d8a763da0c6772b678ab23cba06ceb6..24ffe8c688885b5460aafdbb2ffb71b2becef429 100644 --- a/src/libcore/fmt/float.rs +++ b/src/libcore/fmt/float.rs @@ -125,6 +125,7 @@ fn float_to_exponential_common(fmt: &mut Formatter, num: &T, upper: bool) -> ($ty:ident) => ( #[stable(feature = "rust1", since = "1.0.0")] impl Debug for $ty { + #[inline] fn fmt(&self, fmt: &mut Formatter) -> Result { float_to_decimal_common(fmt, self, true, 1) } diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 65aacb23bd76813511c1381d85f73b17b1a1a344..b4d23d153d80098e832c97de61bde79045912a9d 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -1558,10 +1558,12 @@ fn fmt(&self, f: &mut Formatter) -> Result { $( #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: ?Sized + $tr> $tr for &'a T { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { $tr::fmt(&**self, f) } } #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: ?Sized + $tr> $tr for &'a mut T { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { $tr::fmt(&**self, f) } } )* @@ -1586,6 +1588,7 @@ fn fmt(&self, _: &mut Formatter) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for bool { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { Display::fmt(self, f) } @@ -1600,6 +1603,7 @@ fn fmt(&self, f: &mut Formatter) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for str { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { f.write_char('"')?; let mut from = 0; @@ -1628,6 +1632,7 @@ fn fmt(&self, f: &mut Formatter) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for char { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { f.write_char('\'')?; for c in self.escape_debug() { @@ -1701,10 +1706,12 @@ fn fmt(&self, f: &mut Formatter) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for *const T { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(self, f) } } #[stable(feature = "rust1", since = "1.0.0")] impl Debug for *mut T { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(self, f) } } @@ -1718,6 +1725,7 @@ fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(self, f) } #[stable(feature = "rust1", since = "1.0.0")] impl<$($name:Debug),*> Debug for ($($name,)*) where last_type!($($name,)+): ?Sized { #[allow(non_snake_case, unused_assignments, deprecated)] + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { let mut builder = f.debug_tuple(""); let ($(ref $name,)*) = *self; @@ -1741,6 +1749,7 @@ fn fmt(&self, f: &mut Formatter) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for [T] { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { f.debug_list().entries(self.iter()).finish() } @@ -1748,6 +1757,7 @@ fn fmt(&self, f: &mut Formatter) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for () { + #[inline] fn fmt(&self, f: &mut Formatter) -> Result { f.pad("()") } diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs index ee989854a3772e29362d6dc94250bb18b94a7b73..2992e7cf8db341cf0fde7730212752b19ed70096 100644 --- a/src/libcore/fmt/num.rs +++ b/src/libcore/fmt/num.rs @@ -157,6 +157,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ($T:ident) => { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Debug for $T { + #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(self, f) } diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index fab5832d905df8262bfbaa85971ef913e8711844..3e162afd6490940913beef63ad28fa4c416f1ea6 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2202,6 +2202,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { #[stable(feature = "fnptr_impls", since = "1.4.0")] impl fmt::Debug for $FnTy { + #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Pointer::fmt(&(*self as *const ()), f) }