提交 03707172 编写于 作者: K kennytm 提交者: GitHub

Rollup merge of #47840 - penpalperson:master, r=bluss

Marked Debug implementations for primitive types as #[inline]

Change for issue #47792.
......@@ -1586,6 +1586,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)
}
......@@ -1748,6 +1749,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("()")
}
......
......@@ -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)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册