diff options
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/array_vec.rs | 2 | ||||
| -rw-r--r-- | src/librustc_data_structures/obligation_forest/node_index.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_data_structures/array_vec.rs b/src/librustc_data_structures/array_vec.rs index 848e5a076bb..078bb801751 100644 --- a/src/librustc_data_structures/array_vec.rs +++ b/src/librustc_data_structures/array_vec.rs @@ -255,7 +255,7 @@ impl<'a, A: Array> Drop for Drain<'a, A> { if self.tail_len > 0 { unsafe { - let source_array_vec = &mut *self.array_vec.as_mut_ptr(); + let source_array_vec = self.array_vec.as_mut(); // memmove back untouched tail, update to new length let start = source_array_vec.len(); let tail = self.tail_start; diff --git a/src/librustc_data_structures/obligation_forest/node_index.rs b/src/librustc_data_structures/obligation_forest/node_index.rs index 1063bb3611e..023c56ca59b 100644 --- a/src/librustc_data_structures/obligation_forest/node_index.rs +++ b/src/librustc_data_structures/obligation_forest/node_index.rs @@ -23,6 +23,6 @@ impl NodeIndex { } pub fn get(self) -> usize { - (*self.index - 1) as usize + (self.index.get() - 1) as usize } } |
