Skip to content

Commit 24a69af

Browse files
committed
Auto merge of rust-lang#109546 - saethlin:inline-into, r=scottmcm
Add #[inline] to the Into for From impl I was skimming through the standard library MIR and I noticed a handful of very suspicious `Into::into` calls in `alloc`. ~Since this is a trivial wrapper function, `#[inline(always)]` seems appropriate.;~ `#[inline]` works too and is a lot less spooky. r? `@thomcc`
2 parents d012d2f + badfb17 commit 24a69af

File tree

1 file changed

+1
-0
lines changed
  • library/core/src/convert

1 file changed

+1
-0
lines changed

library/core/src/convert/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ where
722722
///
723723
/// That is, this conversion is whatever the implementation of
724724
/// <code>[From]&lt;T&gt; for U</code> chooses to do.
725+
#[inline]
725726
fn into(self) -> U {
726727
U::from(self)
727728
}

0 commit comments

Comments
 (0)