diff options
| author | bors <bors@rust-lang.org> | 2023-03-25 03:09:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-25 03:09:09 +0000 |
| commit | 24a69af213f4bf23014dc91903e7a934c88f6b9e (patch) | |
| tree | 59d8a907b9117df1a18b48bac66bc52f40143d65 | |
| parent | d012d2f96e2959267b14812929b85e17a155f653 (diff) | |
| parent | badfb17d2fc9ff79a6064058c58dcea7526457f4 (diff) | |
| download | rust-24a69af213f4bf23014dc91903e7a934c88f6b9e.tar.gz rust-24a69af213f4bf23014dc91903e7a934c88f6b9e.zip | |
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`
| -rw-r--r-- | library/core/src/convert/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index 805354be089..8a8d4caf96f 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -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) } |
