Skip to content

Commit 0370717

Browse files
authored
Rollup merge of rust-lang#47840 - penpalperson:master, r=bluss
Marked Debug implementations for primitive types as #[inline] Change for issue rust-lang#47792.
2 parents 89ea6d2 + deba389 commit 0370717

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/libcore/fmt/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,7 @@ impl Display for ! {
15861586

15871587
#[stable(feature = "rust1", since = "1.0.0")]
15881588
impl Debug for bool {
1589+
#[inline]
15891590
fn fmt(&self, f: &mut Formatter) -> Result {
15901591
Display::fmt(self, f)
15911592
}
@@ -1748,6 +1749,7 @@ impl<T: Debug> Debug for [T] {
17481749

17491750
#[stable(feature = "rust1", since = "1.0.0")]
17501751
impl Debug for () {
1752+
#[inline]
17511753
fn fmt(&self, f: &mut Formatter) -> Result {
17521754
f.pad("()")
17531755
}

src/libcore/fmt/num.rs

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ macro_rules! debug {
157157
($T:ident) => {
158158
#[stable(feature = "rust1", since = "1.0.0")]
159159
impl fmt::Debug for $T {
160+
#[inline]
160161
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
161162
fmt::Display::fmt(self, f)
162163
}

0 commit comments

Comments
 (0)