Skip to content

Commit dae0cad

Browse files
Implement pick[23]_mut via get_disjoint_mut [rustc cleanup] rust-lang#138196
1 parent daa4023 commit dae0cad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_index/src/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ impl<I: Idx, T> IndexSlice<I, T> {
118118
/// Panics if `a == b`.
119119
#[inline]
120120
pub fn pick2_mut(&mut self, a: I, b: I) -> (&mut T, &mut T) {
121-
self.raw.get_disjoint_mut([a.index(), b.index()]).unwrap()
121+
self.raw.get_disjoint_mut([a.index(), b.index()]).unwrap().into()
122122
}
123123

124124
/// Returns mutable references to three distinct elements.
125125
///
126126
/// Panics if the elements are not distinct.
127127
#[inline]
128128
pub fn pick3_mut(&mut self, a: I, b: I, c: I) -> (&mut T, &mut T, &mut T) {
129-
self.raw.get_disjoint_mut([a.index(), b.index(), c.index()]).unwrap()
129+
self.raw.get_disjoint_mut([a.index(), b.index(), c.index()]).unwrap().into()
130130
}
131131

132132
#[inline]

0 commit comments

Comments
 (0)