mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Rollup merge of #47840 - penpalperson:master, r=bluss
Marked Debug implementations for primitive types as #[inline] Change for issue #47792.
This commit is contained in:
commit
0370717296
@ -1586,6 +1586,7 @@ impl Display for ! {
|
||||
|
||||
#[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 @@ impl<T: Debug> Debug for [T] {
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl Debug for () {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
f.pad("()")
|
||||
}
|
||||
|
@ -157,6 +157,7 @@ macro_rules! debug {
|
||||
($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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user