1
Fork 0

Fix copy_from_slice which should be extend_from_slice

This commit is contained in:
Markus Westerlind 2020-01-09 07:45:29 +01:00
parent a5657dbc43
commit 898ed636a3

View file

@ -1078,7 +1078,7 @@ where
}) {
// An element changed, prepare to intern the resulting list
let mut new_list = SmallVec::<[_; 8]>::with_capacity(list.len());
new_list.copy_from_slice(&list[..i]);
new_list.extend_from_slice(&list[..i]);
new_list.push(new_t);
new_list.extend(iter.map(|t| t.fold_with(folder)));
intern(folder.tcx(), &new_list)