Skip to content

Commit 9b0d03f

Browse files
committed
Run
1 parent 8c48d03 commit 9b0d03f

35 files changed

+111
-0
lines changed

library/core/src/alloc/layout.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ impl Error for LayoutError {}
482482
// (we need this for downstream impl of trait Error)
483483
#[stable(feature = "alloc_layout", since = "1.28.0")]
484484
impl fmt::Display for LayoutError {
485+
#[inline]
485486
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
486487
f.write_str("invalid parameters to Layout::from_size_align")
487488
}

library/core/src/alloc/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ impl Error for AllocError {}
4343
// (we need this for downstream impl of trait Error)
4444
#[unstable(feature = "allocator_api", issue = "32838")]
4545
impl fmt::Display for AllocError {
46+
#[inline]
4647
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4748
f.write_str("memory allocation failed")
4849
}

library/core/src/any.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ impl TypeId {
630630
#[must_use]
631631
#[stable(feature = "rust1", since = "1.0.0")]
632632
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
633+
#[inline]
633634
pub const fn of<T: ?Sized + 'static>() -> TypeId {
634635
let t: u128 = intrinsics::type_id::<T>();
635636
TypeId { t }

library/core/src/array/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ impl<'a, T, const N: usize> IntoIterator for &'a [T; N] {
321321
type Item = &'a T;
322322
type IntoIter = Iter<'a, T>;
323323

324+
#[inline]
324325
fn into_iter(self) -> Iter<'a, T> {
325326
self.iter()
326327
}

library/core/src/ascii/ascii_char.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ impl [AsciiChar] {
559559

560560
#[unstable(feature = "ascii_char", issue = "110998")]
561561
impl fmt::Display for AsciiChar {
562+
#[inline]
562563
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
563564
<str as fmt::Display>::fmt(self.as_str(), f)
564565
}

library/core/src/cell.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ impl Debug for BorrowError {
722722

723723
#[stable(feature = "try_borrow", since = "1.13.0")]
724724
impl Display for BorrowError {
725+
#[inline]
725726
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
726727
Display::fmt("already mutably borrowed", f)
727728
}
@@ -749,6 +750,7 @@ impl Debug for BorrowMutError {
749750

750751
#[stable(feature = "try_borrow", since = "1.13.0")]
751752
impl Display for BorrowMutError {
753+
#[inline]
752754
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
753755
Display::fmt("already borrowed", f)
754756
}

library/core/src/char/convert.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ pub struct CharTryFromError(());
264264

265265
#[stable(feature = "try_from", since = "1.34.0")]
266266
impl fmt::Display for CharTryFromError {
267+
#[inline]
267268
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
268269
"converted integer out of range for `char`".fmt(f)
269270
}

library/core/src/char/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,13 @@ impl fmt::Display for EscapeUnicode {
219219
pub struct EscapeDefault(escape::EscapeIterInner<10>);
220220

221221
impl EscapeDefault {
222+
#[inline]
222223
fn printable(chr: ascii::Char) -> Self {
223224
let data = [chr];
224225
Self(escape::EscapeIterInner::from_array(data))
225226
}
226227

228+
#[inline]
227229
fn backslash(chr: ascii::Char) -> Self {
228230
let data = [ascii::Char::ReverseSolidus, chr];
229231
Self(escape::EscapeIterInner::from_array(data))
@@ -308,6 +310,7 @@ impl EscapeDebug {
308310
Self(EscapeDebugInner::Char(chr))
309311
}
310312

313+
#[inline]
311314
fn backslash(chr: ascii::Char) -> Self {
312315
let data = [ascii::Char::ReverseSolidus, chr];
313316
let iter = escape::EscapeIterInner::from_array(data);
@@ -318,6 +321,7 @@ impl EscapeDebug {
318321
Self(EscapeDebugInner::Bytes(esc.0))
319322
}
320323

324+
#[inline]
321325
fn clear(&mut self) {
322326
let bytes = escape::EscapeIterInner::from_array([]);
323327
self.0 = EscapeDebugInner::Bytes(bytes);
@@ -386,6 +390,7 @@ pub struct ToLowercase(CaseMappingIter);
386390
#[stable(feature = "rust1", since = "1.0.0")]
387391
impl Iterator for ToLowercase {
388392
type Item = char;
393+
#[inline]
389394
fn next(&mut self) -> Option<char> {
390395
self.0.next()
391396
}
@@ -396,6 +401,7 @@ impl Iterator for ToLowercase {
396401

397402
#[stable(feature = "case_mapping_double_ended", since = "1.59.0")]
398403
impl DoubleEndedIterator for ToLowercase {
404+
#[inline]
399405
fn next_back(&mut self) -> Option<char> {
400406
self.0.next_back()
401407
}
@@ -420,6 +426,7 @@ pub struct ToUppercase(CaseMappingIter);
420426
#[stable(feature = "rust1", since = "1.0.0")]
421427
impl Iterator for ToUppercase {
422428
type Item = char;
429+
#[inline]
423430
fn next(&mut self) -> Option<char> {
424431
self.0.next()
425432
}
@@ -430,6 +437,7 @@ impl Iterator for ToUppercase {
430437

431438
#[stable(feature = "case_mapping_double_ended", since = "1.59.0")]
432439
impl DoubleEndedIterator for ToUppercase {
440+
#[inline]
433441
fn next_back(&mut self) -> Option<char> {
434442
self.0.next_back()
435443
}
@@ -534,13 +542,15 @@ impl fmt::Display for CaseMappingIter {
534542

535543
#[stable(feature = "char_struct_display", since = "1.16.0")]
536544
impl fmt::Display for ToLowercase {
545+
#[inline]
537546
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
538547
fmt::Display::fmt(&self.0, f)
539548
}
540549
}
541550

542551
#[stable(feature = "char_struct_display", since = "1.16.0")]
543552
impl fmt::Display for ToUppercase {
553+
#[inline]
544554
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
545555
fmt::Display::fmt(&self.0, f)
546556
}
@@ -553,6 +563,7 @@ pub struct TryFromCharError(pub(crate) ());
553563

554564
#[stable(feature = "u8_from_char", since = "1.59.0")]
555565
impl fmt::Display for TryFromCharError {
566+
#[inline]
556567
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
557568
"unicode code point out of range".fmt(fmt)
558569
}

library/core/src/escape.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ impl<const N: usize> EscapeIterInner<N> {
8282
Self::new(data, 0..M as u8)
8383
}
8484

85+
#[inline]
8586
pub fn as_ascii(&self) -> &[ascii::Char] {
8687
&self.data[usize::from(self.alive.start)..usize::from(self.alive.end)]
8788
}
8889

90+
#[inline]
8991
pub fn as_str(&self) -> &str {
9092
self.as_ascii().as_str()
9193
}

library/core/src/ffi/c_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ pub struct FromBytesUntilNulError(());
158158

159159
#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
160160
impl fmt::Display for FromBytesUntilNulError {
161+
#[inline]
161162
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
162163
write!(f, "data provided does not contain a nul")
163164
}

0 commit comments

Comments
 (0)