Skip to content

Commit 6ae3f89

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 3b3248b + 1b42803 commit 6ae3f89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/convert/mod.rs

Lines changed: 1 addition & 0 deletions
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)