Skip to content

Commit 7255a90

Browse files
committed
Auto merge of #112016 - GuillaumeGomez:rollup-fhqn4i6, r=GuillaumeGomez
Rollup of 6 pull requests Successful merges: - #111936 (Include test suite metadata in the build metrics) - #111952 (Remove DesugaringKind::Replace.) - #111966 (Add #[inline] to array TryFrom impls) - #111983 (Perform MIR type ops locally in new solver) - #111997 (Fix re-export of doc hidden macro not showing up) - #112014 (rustdoc: get unnormalized link destination for suggestions) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 22ca1f9 + 3c2439c commit 7255a90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/array/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ where
204204
{
205205
type Error = TryFromSliceError;
206206

207+
#[inline]
207208
fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError> {
208209
<&Self>::try_from(slice).map(|r| *r)
209210
}
@@ -228,6 +229,7 @@ where
228229
{
229230
type Error = TryFromSliceError;
230231

232+
#[inline]
231233
fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError> {
232234
<Self>::try_from(&*slice)
233235
}
@@ -249,6 +251,7 @@ where
249251
impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N] {
250252
type Error = TryFromSliceError;
251253

254+
#[inline]
252255
fn try_from(slice: &'a [T]) -> Result<&'a [T; N], TryFromSliceError> {
253256
if slice.len() == N {
254257
let ptr = slice.as_ptr() as *const [T; N];
@@ -276,6 +279,7 @@ impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N] {
276279
impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N] {
277280
type Error = TryFromSliceError;
278281

282+
#[inline]
279283
fn try_from(slice: &'a mut [T]) -> Result<&'a mut [T; N], TryFromSliceError> {
280284
if slice.len() == N {
281285
let ptr = slice.as_mut_ptr() as *mut [T; N];

0 commit comments

Comments
 (0)