Auto merge of #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`
This commit is contained in:
commit
24a69af213
1 changed files with 1 additions and 0 deletions
|
@ -722,6 +722,7 @@ where
|
|||
///
|
||||
/// That is, this conversion is whatever the implementation of
|
||||
/// <code>[From]<T> for U</code> chooses to do.
|
||||
#[inline]
|
||||
fn into(self) -> U {
|
||||
U::from(self)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue